projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
02ebea7
)
libxc: fix retrieval of and remove pointless check on gzip size
author
Matthew Daley
<mattjd@gmail.com>
Thu, 31 Oct 2013 02:58:53 +0000
(15:58 +1300)
committer
Ian Campbell
<ian.campbell@citrix.com>
Thu, 31 Oct 2013 21:13:47 +0000
(21:13 +0000)
Coverity-ID:
1055587
Coverity-ID:
1055963
Signed-off-by: Matthew Daley <mattjd@gmail.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxc/xc_dom_core.c
patch
|
blob
|
history
diff --git
a/tools/libxc/xc_dom_core.c
b/tools/libxc/xc_dom_core.c
index 0f367f6b8b5f7c7b534d787c3f1206e97ee57417..3bf51efd647e7b1d7de8636c3296faa4a5da1e22 100644
(file)
--- 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,