Skip to content
Snippets Groups Projects
Commit 107b801c authored by Matthias Fuchs's avatar Matthias Fuchs Committed by Wolfgang Denk
Browse files

Fix gunzip in case of insufficient output buffer


U-Boot's gunzip() function does not handle the return code
of zlib's inflate() function correctly. gunzip() is implemented
to uncompress all input data in one run. So the correct return
code for the good case is Z_STREAM_END. In case of insufficient
output buffer memory inflate returns Z_OK. For gunzip() this
is an error.

It also makes sense to me to call inflateEnd() also in case
of an error.

Signed-off-by: default avatarMatthias Fuchs <matthias.fuchs@esd-electronics.com>
parent 49ad4801
No related branches found
No related tags found
Loading
Loading
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