Minor security fixes
This commit is contained in:
@@ -98,7 +98,7 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
size_t decompressed =
|
||||
ZSTD_decompress_with_dict(output, input_size * MAX_COMPRESSION_RATIO,
|
||||
ZSTD_decompress_with_dict(output, decompressed_size,
|
||||
input, input_size, dict, dict_size);
|
||||
|
||||
write_file(argv[2], output, decompressed);
|
||||
|
||||
@@ -1331,6 +1331,8 @@ static void execute_sequences(io_streams_t *const streams,
|
||||
}
|
||||
match_length -= dict_copy;
|
||||
}
|
||||
} else if (offset > ctx->header.window_size) {
|
||||
CORRUPTION();
|
||||
}
|
||||
|
||||
// We must copy byte by byte because the match length might be larger
|
||||
|
||||
Reference in New Issue
Block a user