From cdf664ad44c724c8fa1059f9a5561c80cf2769a7 Mon Sep 17 00:00:00 2001 From: pk910 Date: Mon, 10 Oct 2011 21:56:05 +0200 Subject: [PATCH] fixed WHOHandler.c --- src/WHOHandler.c | 2 ++ 1 file changed, 2 insertions(+) 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); -- 2.20.1