[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r6338 - GNUnet/src/applications/topology_default
From: |
gnunet |
Subject: |
[GNUnet-SVN] r6338 - GNUnet/src/applications/topology_default |
Date: |
Sat, 16 Feb 2008 20:03:18 -0700 (MST) |
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';
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r6338 - GNUnet/src/applications/topology_default,
gnunet <=