out of bounds, constant not named, c3042
authorChristian Grothoff <christian@grothoff.org>
Fri, 16 Sep 2011 14:02:03 +0000 (14:02 +0000)
committerChristian Grothoff <christian@grothoff.org>
Fri, 16 Sep 2011 14:02:03 +0000 (14:02 +0000)
src/vpn/gnunet-service-dns.c

index 80cbbbd16a70581d1dfae99797c3de53f849e931..72b58f75535bd5fe2366c6739d7841261229982f 100644 (file)
@@ -93,7 +93,7 @@ static struct
   uint16_t local_port;
   char *name;
   uint8_t namelen;
-} query_states[UINT16_MAX];
+} query_states[UINT16_MAX+1];
 
 /**
  * A struct used to give more than one value as
@@ -1383,7 +1383,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
 
   unsigned int i;
 
-  for (i = 0; i < 65536; i++)
+  for (i = 0; i < UINT16_MAX + 1; i++)
   {
     query_states[i].valid = GNUNET_NO;
   }