fixed WHOHandler.c
[NeonServV5.git] / src / WHOHandler.c
index 3ebe0bd186eee6306ae77080d72021e216854735..a296298933395d51e11843fb376b478663067484 100644 (file)
@@ -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);