[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] libxc/unlz4: always set an error return code on failures

commit cbe6ab84f6dbf68a5c79cb70e09f5c3a8f77b9e1
Author:     Jan Beulich <JBeulich@xxxxxxxx>
AuthorDate: Fri Jan 24 08:01:21 2014 +0000
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Tue Jan 28 11:13:07 2014 +0000

    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 <mattjd@xxxxxxxxx>
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
 tools/libxc/xc_dom_decompress_lz4.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tools/libxc/xc_dom_decompress_lz4.c 
index 4787535..08272fe 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;
generated by git-patchbot for /home/xen/git/xen.git#master

Xen-changelog mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.