From: pk910 Date: Mon, 10 Oct 2011 19:56:05 +0000 (+0200) Subject: fixed WHOHandler.c X-Git-Tag: v5.3~296 X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=commitdiff_plain;h=cdf664ad44c724c8fa1059f9a5561c80cf2769a7 fixed WHOHandler.c --- diff --git a/src/WHOHandler.c b/src/WHOHandler.c index 3ebe0bd..a296298 100644 --- a/src/WHOHandler.c +++ b/src/WHOHandler.c @@ -131,6 +131,7 @@ void recv_whohandler_354(struct ClientSocket *client, char **argv, unsigned int int i; if(argc < 2) return; int type = atoi(argv[1]); + if(!type) return; if(!(type & WHOQUEUETYPE_ISONQUEUE)) return; struct WHOQueueEntry* entry = getNextWHOQueueEntry(client, 0); if(entry == NULL || (entry->type & WHOQUEUETYPE_CHECKTYPE) != (type & WHOQUEUETYPE_CHECKTYPE)) return; @@ -202,6 +203,7 @@ void recv_whohandler_354(struct ClientSocket *client, char **argv, unsigned int void recv_whohandler_315(struct ClientSocket *client, char **argv, unsigned int argc) { if(argc < 2) return; char *typestr = strstr(argv[1], ",") + 1; + if(!typestr) return; int type = atoi(typestr); if(!(type & WHOQUEUETYPE_ISONQUEUE)) return; struct WHOQueueEntry* entry = getNextWHOQueueEntry(client, 1);