gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] branch master updated: Fix array indexing


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: Fix array indexing
Date: Sun, 26 Nov 2017 06:32:51 +0100

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

david-barksdale pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 2d12edeff Fix array indexing
2d12edeff is described below

commit 2d12edeff095f947c87c8c0a6fe66c125eaf9d8e
Author: David Barksdale <address@hidden>
AuthorDate: Sat Nov 25 23:31:58 2017 -0600

    Fix array indexing
    
    Found this while investigating #4909, might be related.
---
 src/cadet/gnunet-service-cadet_paths.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/cadet/gnunet-service-cadet_paths.c 
b/src/cadet/gnunet-service-cadet_paths.c
index e75fd393c..79eed0dcc 100644
--- a/src/cadet/gnunet-service-cadet_paths.c
+++ b/src/cadet/gnunet-service-cadet_paths.c
@@ -498,8 +498,8 @@ GCPP_try_path_from_dht (const struct GNUNET_PeerIdentity 
*get_path,
     const struct GNUNET_PeerIdentity *pid;
 
     pid = (off < get_path_length)
-      ? &get_path[get_path_length - off]
-      : &put_path[get_path_length + put_path_length - off];
+      ? &get_path[get_path_length - off - 1]
+      : &put_path[get_path_length + put_path_length - off - 1];
     cpath[off - skip] = GCP_get (pid,
                                  GNUNET_YES);
     /* Check that no peer is twice on the path */

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



reply via email to

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