aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/util.c b/src/common/util.c
index f0a4cab01f..c38f1d10cc 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -175,6 +175,8 @@ _tor_realloc(void *ptr, size_t size DMALLOC_PARAMS)
{
void *result;
+ tor_assert(size < SIZE_T_CEILING);
+
#ifdef USE_DMALLOC
result = dmalloc_realloc(file, line, ptr, size, DMALLOC_FUNC_REALLOC, 0);
#else