• Greg Kroah-Hartman's avatar
    lz4: fix another possible overrun · 8cef3ce4
    Greg Kroah-Hartman authored
    commit 4148c1f6 upstream.
    
    There is one other possible overrun in the lz4 code as implemented by
    Linux at this point in time (which differs from the upstream lz4
    codebase, but will get synced at in a future kernel release.)  As
    pointed out by Don, we also need to check the overflow in the data
    itself.
    
    While we are at it, replace the odd error return value with just a
    "simple" -1 value as the return value is never used for anything other
    than a basic "did this work or not" check.
    Reported-by: default avatar"Don A. Bailey" <donb@securitymouse.com>
    Reported-by: default avatarWilly Tarreau <w@1wt.eu>
    Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
    8cef3ce4
lz4_decompress.c 7.71 KB