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

Issue 2875008: Emergency goobsdiff patch: don't use LZMA_RUN after LZMA_FINISH (Closed)

Created:
10 years, 6 months ago by Mark Mentovai
Modified:
9 years, 7 months ago
Reviewers:
TVL
CC:
chromium-reviews, kuchhal
Visibility:
Public.

Description

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 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=50537

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -3 lines) Patch
M chrome/installer/mac/third_party/bsdiff/goobspatch.c View 2 chunks +5 lines, -3 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Mark Mentovai
TBR (emergency)
10 years, 6 months ago (2010-06-22 22:31:40 UTC) #1
TVL
10 years, 6 months ago (2010-06-23 11:52:57 UTC) #2
lgtm

Powered by Google App Engine
This is Rietveld 408576698