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

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



commit 55d207597e05b79fb0d90868abfe0f77b3ba66f2
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Tue Jan 28 13:31:28 2014 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Jan 28 13:31:28 2014 +0100

    xen/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>
---
 xen/common/unlz4.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/xen/common/unlz4.c b/xen/common/unlz4.c
index 195d829..9dcaec7 100644
--- a/xen/common/unlz4.c
+++ b/xen/common/unlz4.c
@@ -133,6 +133,7 @@ STATIC int INIT unlz4(unsigned char *input, unsigned int 
in_len,
                        goto exit_2;
                }
 
+               ret = -1;
                if (flush && flush(outp, dest_len) != dest_len)
                        goto exit_2;
                if (output)
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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