diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-22 22:31:38 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-22 22:31:38 +0000 |
commit | 7f9ca7c4d29183ad1cdb99080095e1354c7946fe (patch) | |
tree | 8bfc5f46fecaa5b4000aae2ad5b5c4e95ca99a03 /WATCHLISTS | |
parent | 6424115c000ba3270d382fcf3dd30f205b2388ad (diff) | |
download | chromium_src-7f9ca7c4d29183ad1cdb99080095e1354c7946fe.zip chromium_src-7f9ca7c4d29183ad1cdb99080095e1354c7946fe.tar.gz chromium_src-7f9ca7c4d29183ad1cdb99080095e1354c7946fe.tar.bz2 |
Emergency goobsdiff patch: don't use LZMA_RUN after LZMA_FINISH.
In testing, cases were discovered where fread would read until EOF, but
lzma_code would not be able to decompress that entire block in one call
because not enough space was available in the output buffer. Calling lzma_code
with LZMA_FINISH followed by LZMA_RUN is incorrect. Once LZMA_FINISH is used
once, subsequent calls to lzma_code must also use LZMA_FINISH.
From <lzma/base.h>:
* After the first use of LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, or LZMA_FINISH,
* the same `action' must is used until lzma_code() returns LZMA_STREAM_END.
* Also, the amount of input (that is, strm->avail_in) must not be modified
* by the application until lzma_code() returns LZMA_STREAM_END. Changing the
* `action' or modifying the amount of input will make lzma_code() return
* LZMA_PROG_ERROR.
This bug caused goobspatch to exit prematurely with a message like
goobspatch: xzread(extra, 216): 11
11 is LZMA_PROG_ERROR.
BUG=47199
TEST=none
Review URL: http://codereview.chromium.org/2875008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50537 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'WATCHLISTS')
0 files changed, 0 insertions, 0 deletions