--- /dev/null
+ o Minor bugfixes (compression):
+ - Right after compression/decompression work is done, check for errors.
+ Before this, we would consider compression bomb before that and then
+ looking for errors leading to false positive on that log warning. Fixes
+ bug 40739; bugfix on 0.3.5.1-alpha. Patch by "cypherpunks".
+
&output, &input);
}
+ if (ZSTD_isError(retval)) {
+ log_warn(LD_GENERAL, "Zstandard %s didn't finish: %s.",
+ state->compress ? "compression" : "decompression",
+ ZSTD_getErrorName(retval));
+ return TOR_COMPRESS_ERROR;
+ }
+
state->input_so_far += input.pos;
state->output_so_far += output.pos;
return TOR_COMPRESS_ERROR;
}
- if (ZSTD_isError(retval)) {
- log_warn(LD_GENERAL, "Zstandard %s didn't finish: %s.",
- state->compress ? "compression" : "decompression",
- ZSTD_getErrorName(retval));
- return TOR_COMPRESS_ERROR;
- }
-
if (state->compress && !state->have_called_end) {
retval = ZSTD_flushStream(state->u.compress_stream, &output);