[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/2] xen: always set an error return code on lz4 decompression failures
>>> On 08.11.13 at 01:26, Matthew Daley <mattjd@xxxxxxxxx> wrote: As just sent to LKML, I'd like to do this with a one line change (reproduced below), and by addressing it in the original first (and us just inheriting the fix). I'd recommend the same for patch 2, as that also touches a clone of the original code. Jan 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. Reported-by: Matthew Daley <mattjd@xxxxxxxxx> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Cc: Kyungsik Lee <kyungsik.lee@xxxxxxx> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- a/lib/decompress_unlz4.c +++ b/lib/decompress_unlz4.c @@ -141,6 +141,7 @@ STATIC inline int INIT unlz4(u8 *input, goto exit_2; } + ret = -1; if (flush && flush(outp, dest_len) != dest_len) goto exit_2; if (output) _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |