gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] 20/28: fix out-of-bounds case in parser


From: gnunet
Subject: [GNUnet-SVN] [gnunet] 20/28: fix out-of-bounds case in parser
Date: Fri, 10 Mar 2017 18:19:04 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

commit 71d41835b8353d7d080c2de50b0303ed6861ffba
Author: Christian Grothoff <address@hidden>
AuthorDate: Fri Mar 10 18:00:53 2017 +0100

    fix out-of-bounds case in parser
---
 src/testbed/testbed_api_topology.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/testbed/testbed_api_topology.c 
b/src/testbed/testbed_api_topology.c
index a21a7cf53..544f127a9 100644
--- a/src/testbed/testbed_api_topology.c
+++ b/src/testbed/testbed_api_topology.c
@@ -1147,9 +1147,11 @@ gen_topo_from_file (struct TopologyContext *tc,
              other_peer_id);
       while (('\n' != data[offset]) && ('|' != data[offset]) && (offset < fs))
         offset++;
-      if ('\n' == data[offset])
+      if ( (offset < fs) &&
+           ('\n' == data[offset]) )
         state = PEER_INDEX;
-      else if ('|' == data[offset])
+      else if ( (offset < fs) &&
+                ('|' == data[offset]) )
       {
         state = OTHER_PEER_INDEX;
         offset++;

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]