summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-11-02 15:53:34 +0100
committerChristian Grothoff <christian@grothoff.org>2018-11-02 15:53:34 +0100
commitc25fa6abad5893c052b05e2fd23d6fd8fee1a0cf (patch)
treea682d59746f2b693a1db4b24f9e1e180ac4207bc /src
parentedbb87266a92db6a08dd38963829cad954cceef6 (diff)
fix #5467
Diffstat (limited to 'src')
-rw-r--r--src/util/container_multihashmap32.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/util/container_multihashmap32.c b/src/util/container_multihashmap32.c
index 016dbabcc..72940489e 100644
--- a/src/util/container_multihashmap32.c
+++ b/src/util/container_multihashmap32.c
@@ -265,11 +265,15 @@ GNUNET_CONTAINER_multihashmap32_iterate (struct GNUNET_CONTAINER_MultiHashMap32
if (GNUNET_OK != it (it_cls,
e->key,
e->value))
+ {
+ GNUNET_assert (--map->next_cache_off < NEXT_CACHE_SIZE);
return GNUNET_SYSERR;
+ }
}
count++;
}
}
+ GNUNET_assert (--map->next_cache_off < NEXT_CACHE_SIZE);
return count;
}
@@ -567,9 +571,13 @@ GNUNET_CONTAINER_multihashmap32_get_multiple (struct GNUNET_CONTAINER_MultiHashM
(GNUNET_OK != it (it_cls,
key,
e->value)) )
- return GNUNET_SYSERR;
+ {
+ GNUNET_assert (--map->next_cache_off < NEXT_CACHE_SIZE);
+ return GNUNET_SYSERR;
+ }
count++;
}
+ GNUNET_assert (--map->next_cache_off < NEXT_CACHE_SIZE);
return count;
}