[or-cvs] [tor/release-0.2.1] Fix a SIZE_T_CEILING check in torgzip.c; noticed by cypherpunks
arma at torproject.org
arma at torproject.org
Sat Jan 15 19:45:49 UTC 2011
commit d14b0d54d2469744266769d7e61135d1aa1c9c11
Author: Nick Mathewson <nickm at torproject.org>
Date: Wed Jan 5 12:42:34 2011 -0500
Fix a SIZE_T_CEILING check in torgzip.c; noticed by cypherpunks
---
src/common/torgzip.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/common/torgzip.c b/src/common/torgzip.c
index b44b159..7678668 100644
--- a/src/common/torgzip.c
+++ b/src/common/torgzip.c
@@ -247,7 +247,7 @@ tor_gzip_uncompress(char **out, size_t *out_len,
out_size = in_len * 2; /* guess 50% compression. */
if (out_size < 1024) out_size = 1024;
- if (out_size > SIZE_T_CEILING || out_size > UINT_MAX)
+ if (out_size >= SIZE_T_CEILING || out_size > UINT_MAX)
goto err;
*out = tor_malloc(out_size);
More information about the tor-commits
mailing list