fix overflow
authorChristian Grothoff <christian@grothoff.org>
Fri, 11 Jun 2010 09:46:59 +0000 (09:46 +0000)
committerChristian Grothoff <christian@grothoff.org>
Fri, 11 Jun 2010 09:46:59 +0000 (09:46 +0000)
src/hello/hello.c

index 06142535b672eba18ec51c502dd479e3532a8655..abcc25c712172d2b0d166f0614efebb4cd30fe9a 100644 (file)
@@ -126,7 +126,7 @@ get_hello_address_size (const char *buf, size_t max, uint16_t * ralen)
       pos++;
       slen++;
     }
-  if ('\0' != *pos)
+  if (left == 0)
     {
       /* 0-termination not found */
       GNUNET_break_op (0);