diff options
author | Jan Beulich <JBeulich@suse.com> | 2014-01-10 12:42:10 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2014-01-10 12:42:10 +1100 |
commit | 8824ebbf52c05b1dfff28587fb5f62a36d664e08 (patch) | |
tree | 48d41a7d8a4857097ec50d22e1f918d5734b81a0 /lib | |
parent | da0e2b4d288e1251088c448344f8e700b30046e0 (diff) |
lib/decompress_unlz4.c: always set an error return code on failures
"ret", being set to -1 early on, gets cleared by the first invocation of
lz4_decompress()/lz4_decompress_unknownoutputsize(), and hence subsequent
failures wouldn't be noticed by the caller without setting it back to -1
right after those calls.
Reported-by: Matthew Daley <mattjd@gmail.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: Kyungsik Lee <kyungsik.lee@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/decompress_unlz4.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/decompress_unlz4.c b/lib/decompress_unlz4.c index 3e67cfad16ad..7d1e83caf8ad 100644 --- a/lib/decompress_unlz4.c +++ b/lib/decompress_unlz4.c @@ -141,6 +141,7 @@ STATIC inline int INIT unlz4(u8 *input, int in_len, goto exit_2; } + ret = -1; if (flush && flush(outp, dest_len) != dest_len) goto exit_2; if (output) |