mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Fix a SIZE_T_CEILING check in torgzip.c; noticed by cypherpunks
This commit is contained in:
parent
64798dab4f
commit
d14b0d54d2
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user