Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Unified Diff: src/liblzma/simple/simple_coder.c

Issue 12568011: Update XZ Utils to 5.0.4 (third_party) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/xz/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/liblzma/simple/simple_coder.c
===================================================================
--- src/liblzma/simple/simple_coder.c (revision 87706)
+++ src/liblzma/simple/simple_coder.c (working copy)
@@ -35,9 +35,6 @@
} else {
// Call the next coder in the chain to provide us some data.
- // We don't care about uncompressed_size here, because
- // the next filter in the chain will do it for us (since
- // we don't change the size of the data).
const lzma_ret ret = coder->next.code(
coder->next.coder, allocator,
in, in_pos, in_size,
@@ -110,7 +107,7 @@
// filtered if the buffer sizes used by the application are reasonable.
const size_t out_avail = out_size - *out_pos;
const size_t buf_avail = coder->size - coder->pos;
- if (out_avail > buf_avail) {
+ if (out_avail > buf_avail || buf_avail == 0) {
// Store the old position so that we know from which byte
// to start filtering.
const size_t out_start = *out_pos;

Powered by Google App Engine
This is Rietveld 408576698