ia64/xen-unstable
changeset 15435:5ec34f7f31ab
libxenguest: Add another range check to dom restore.
Signed-off-by: Keir Fraser <keir@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author | kfraser@localhost.localdomain |
---|---|
date | Thu Jun 21 12:10:01 2007 +0100 (2007-06-21) |
parents | a83632dfbb28 |
children | acb7aa72fac7 |
files | tools/libxc/xc_domain_restore.c |
line diff
1.1 --- a/tools/libxc/xc_domain_restore.c Thu Jun 21 09:47:39 2007 +0100 1.2 +++ b/tools/libxc/xc_domain_restore.c Thu Jun 21 12:10:01 2007 +0100 1.3 @@ -465,7 +465,7 @@ int xc_domain_restore(int xc_handle, int 1.4 if ( j == 0 ) 1.5 break; /* our work here is done */ 1.6 1.7 - if ( j > MAX_BATCH_SIZE ) 1.8 + if ( (j > MAX_BATCH_SIZE) || (j < 0) ) 1.9 { 1.10 ERROR("Max batch size exceeded. Giving up."); 1.11 goto out;