Skip to content
Snippets Groups Projects
Commit 362a0e43 authored by Simon Glass's avatar Simon Glass Committed by Tom Rini
Browse files

bzlib: Update destLen even on error


This allows the caller to easily detect how much of the destination buffer
has been used.

Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
parent 3086c055
No related branches found
No related tags found
No related merge requests found
......@@ -1350,11 +1350,11 @@ int BZ_API(BZ2_bzBuffToBuffDecompress)
strm.avail_out = *destLen;
ret = BZ2_bzDecompress ( &strm );
*destLen -= strm.avail_out;
if (ret == BZ_OK) goto output_overflow_or_eof;
if (ret != BZ_STREAM_END) goto errhandler;
/* normal termination */
*destLen -= strm.avail_out;
BZ2_bzDecompressEnd ( &strm );
return BZ_OK;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment