[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] libxc: fix retrieval of and remove pointless check on gzip size
commit e9fa4c863623eb169cbf6f282921b00dac698ed5 Author: Matthew Daley <mattjd@xxxxxxxxx> AuthorDate: Thu Oct 31 15:58:53 2013 +1300 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Thu Oct 31 21:13:47 2013 +0000 libxc: fix retrieval of and remove pointless check on gzip size Coverity-ID: 1055587 Coverity-ID: 1055963 Signed-off-by: Matthew Daley <mattjd@xxxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- tools/libxc/xc_dom_core.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/libxc/xc_dom_core.c b/tools/libxc/xc_dom_core.c index 0f367f6..3bf51ef 100644 --- a/tools/libxc/xc_dom_core.c +++ b/tools/libxc/xc_dom_core.c @@ -294,8 +294,8 @@ size_t xc_dom_check_gzip(xc_interface *xch, void *blob, size_t ziplen) return 0; gzlen = blob + ziplen - 4; - unziplen = gzlen[3] << 24 | gzlen[2] << 16 | gzlen[1] << 8 | gzlen[0]; - if ( (unziplen < 0) || (unziplen > XC_DOM_DECOMPRESS_MAX) ) + unziplen = (size_t)gzlen[3] << 24 | gzlen[2] << 16 | gzlen[1] << 8 | gzlen[0]; + if ( unziplen > XC_DOM_DECOMPRESS_MAX ) { xc_dom_printf (xch, -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |