aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-06-21 12:10:01 +0100
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-06-21 12:10:01 +0100
commit5a07d757fb2f8b993f02ba1258413e628dd8d85c (patch)
treebe40449b830a11359eb4354a28d4319e647275c4 /tools
parent284d8c488102b6d59adb2a89930e9e3827f1ba19 (diff)
downloadxen-5a07d757fb2f8b993f02ba1258413e628dd8d85c.tar.gz
xen-5a07d757fb2f8b993f02ba1258413e628dd8d85c.tar.bz2
xen-5a07d757fb2f8b993f02ba1258413e628dd8d85c.zip
libxenguest: Add another range check to dom restore.
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/libxc/xc_domain_restore.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/libxc/xc_domain_restore.c b/tools/libxc/xc_domain_restore.c
index 3193ce191c..e7ff90dcfd 100644
--- a/tools/libxc/xc_domain_restore.c
+++ b/tools/libxc/xc_domain_restore.c
@@ -465,7 +465,7 @@ int xc_domain_restore(int xc_handle, int io_fd, uint32_t dom,
if ( j == 0 )
break; /* our work here is done */
- if ( j > MAX_BATCH_SIZE )
+ if ( (j > MAX_BATCH_SIZE) || (j < 0) )
{
ERROR("Max batch size exceeded. Giving up.");
goto out;