diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-01-03 15:15:27 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-01-03 15:15:27 -0500 |
commit | e09ab69703967716b2765e062ca229e641dba53e (patch) | |
tree | 37ca7884193571a6204a3f40981b2cdcdaa6f726 /src | |
parent | 5c09431cc7c3843a26b2fcc8e52f56f3bba8abb6 (diff) | |
download | tor-e09ab69703967716b2765e062ca229e641dba53e.tar.gz tor-e09ab69703967716b2765e062ca229e641dba53e.zip |
Check size against SIZE_T_CEILING in realloc too.
Fixes bug 2324.
Diffstat (limited to 'src')
-rw-r--r-- | src/common/util.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/util.c b/src/common/util.c index 2b1430c9f2..7a24df8133 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -167,6 +167,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 |