diff options
Diffstat (limited to 'src/common/container.c')
-rw-r--r-- | src/common/container.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/common/container.c b/src/common/container.c index e1ed67856b..b138c9273c 100644 --- a/src/common/container.c +++ b/src/common/container.c @@ -90,6 +90,7 @@ void smartlist_add_all(smartlist_t *s1, const smartlist_t *s2) { smartlist_ensure_capacity(s1, s1->num_used + s2->num_used); + tor_assert(s1->capacity >= s1->num_used+s2->num_used); memcpy(s1->list + s1->num_used, s2->list, s2->num_used*sizeof(void*)); s1->num_used += s2->num_used; } |