Skip to content
  • Matthias Fuchs's avatar
    Fix gunzip in case of insufficient output buffer · 107b801c
    Matthias Fuchs authored
    
    
    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>
    107b801c