mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-02-21 01:42:18 +00:00
Don't wander off the end of the array and trash things.
This commit is contained in:
parent
3fd262c6f8
commit
2ccbc54dc1
@ -264,7 +264,7 @@ int overlay_route_init(int mb_ram)
|
||||
|
||||
/* Generate hash ordering function */
|
||||
strbuf b = strbuf_alloca(12 * 32);
|
||||
for(i=0;i<32;i++) {
|
||||
for(i=0;i<sizeof overlay_route_hash_order / sizeof overlay_route_hash_order[0];i++) {
|
||||
j=0;
|
||||
overlay_route_hash_order[i]=random()&31;
|
||||
while(j<i) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user