projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6249fe6
)
Fix array indexing
author
David Barksdale
<amatus@amat.us>
Sun, 26 Nov 2017 05:31:58 +0000
(23:31 -0600)
committer
David Barksdale
<amatus@amat.us>
Sun, 26 Nov 2017 05:31:58 +0000
(23:31 -0600)
Found this while investigating #4909, might be related.
src/cadet/gnunet-service-cadet_paths.c
patch
|
blob
|
history
diff --git
a/src/cadet/gnunet-service-cadet_paths.c
b/src/cadet/gnunet-service-cadet_paths.c
index e75fd393c22d9bad30ee6464cd0f3d3e4738c339..79eed0dccdc4d65190bd916dc209653606748836 100644
(file)
--- 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 */