mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Check for trailing input garbage in tor_compress_impl() when decompressing
Fixes #22629.
This commit is contained in:
parent
8e1b37a4aa
commit
952c9073ad
@ -139,7 +139,15 @@ tor_compress_impl(int compress,
|
||||
if (compress || complete_only) {
|
||||
goto err;
|
||||
} else {
|
||||
goto done;
|
||||
if (in_len != 0) {
|
||||
log_fn(protocol_warn_level, LD_PROTOCOL,
|
||||
"Unexpected extra input while decompressing");
|
||||
log_debug(LD_GENERAL, "method: %d level: %d at len: %zd",
|
||||
method, compression_level, in_len);
|
||||
goto err;
|
||||
} else {
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case TOR_COMPRESS_BUFFER_FULL: {
|
||||
|
Loading…
Reference in New Issue
Block a user