Author: grothoff
Date: 2008-02-16 20:03:17 -0700 (Sat, 16 Feb 2008)
New Revision: 6338
Modified:
GNUnet/src/applications/topology_default/topology.c
Log:
fix
Modified: GNUnet/src/applications/topology_default/topology.c
===================================================================
--- GNUnet/src/applications/topology_default/topology.c 2008-02-17 02:44:23 UTC
(rev 6337)
+++ GNUnet/src/applications/topology_default/topology.c 2008-02-17 03:03:17 UTC
(rev 6338)
@@ -552,7 +552,8 @@
pos = 0;
while ((pos < size) && isspace (data[pos]))
pos++;
- while (pos <= size - sizeof (GNUNET_EncName))
+ while ( (size >= sizeof(GNUNET_EncName)) &&
+ (pos <= size - sizeof (GNUNET_EncName)) )
{
memcpy (&enc, &data[pos], sizeof (GNUNET_EncName));
if (!isspace (enc.encoding[sizeof (GNUNET_EncName) - 1]))
@@ -562,6 +563,10 @@
GNUNET_GE_USER,
_
("Syntax error in topology specification,
skipping bytes.\n"));
+ pos++;
+ while ( (pos < size) &&
+ (! isspace (data[pos])) )
+ pos++;
continue;
}
enc.encoding[sizeof (GNUNET_EncName) - 1] = '\0';
_______________________________________________
GNUnet-SVN mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnunet-svn