From: Jan Beulich Date: Fri, 24 Jan 2014 08:01:21 +0000 (+0000) Subject: libxc/unlz4: always set an error return code on failures X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~5649 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=cbe6ab84f6dbf68a5c79cb70e09f5c3a8f77b9e1;p=xen.git libxc/unlz4: 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. Linux commit: 2a1d689c9ba42a6066540fb221b6ecbd6298b728 Reported-by: Matthew Daley Signed-off-by: Jan Beulich Acked-by: Ian Campbell --- diff --git a/tools/libxc/xc_dom_decompress_lz4.c b/tools/libxc/xc_dom_decompress_lz4.c index 47875359ab..08272fe41f 100644 --- a/tools/libxc/xc_dom_decompress_lz4.c +++ b/tools/libxc/xc_dom_decompress_lz4.c @@ -98,6 +98,7 @@ int xc_try_lz4_decode( goto exit_2; } + ret = -1; outp += dest_len; size -= chunksize;