diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-01-05 12:42:34 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-01-05 12:42:34 -0500 |
commit | d14b0d54d2469744266769d7e61135d1aa1c9c11 (patch) | |
tree | 44c6fd447cabf5467a222b5e75db04ce89199536 /src/common/torgzip.c | |
parent | 64798dab4f4fa9404c92d98cdb10d312b1f6e556 (diff) | |
download | tor-d14b0d54d2469744266769d7e61135d1aa1c9c11.tar.gz tor-d14b0d54d2469744266769d7e61135d1aa1c9c11.zip |
Fix a SIZE_T_CEILING check in torgzip.c; noticed by cypherpunks
Diffstat (limited to 'src/common/torgzip.c')
-rw-r--r-- | 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 b44b159a46..7678668777 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); |