commit 36d4f6c6015a0c93a2785e135d43dc8f23797b38 from: Alexander Barton date: Fri Dec 24 11:48:03 2010 UTC Don't assert() when serching a client for an invalid server token This is only relevant when a trusted server on a server-server link sends invalid commands. commit - 186b14f332810dd8e828c4f07ec89efcc298d4b0 commit + 36d4f6c6015a0c93a2785e135d43dc8f23797b38 blob - 739c5ea5f77e64a95c8e4bc25dd9bfa8aed0f35b blob + ecd1a7c5fb462cdd6f319578376a42dccb7eb09a --- src/ngircd/client.c +++ src/ngircd/client.c @@ -553,18 +553,20 @@ Client_Search( const char *Nick ) } /* Client_Search */ +/** + * Get client structure ("introducer") identfied by a server token. + * @return CLIENT structure or NULL if none could be found. + */ GLOBAL CLIENT * Client_GetFromToken( CLIENT *Client, int Token ) { - /* Client-Struktur, die den entsprechenden Introducer (=Client) - * und das gegebene Token hat, liefern. Wird keine gefunden, - * so wird NULL geliefert. */ - CLIENT *c; assert( Client != NULL ); - assert( Token > 0 ); + if (!Token) + return NULL; + c = My_Clients; while (c) { if ((c->type == CLIENT_SERVER) && (c->introducer == Client) &&