mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
libxenguest: Add another range check to dom restore.
Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
1 parent
284d8c4881
commit
5a07d757fb
1 file changed
+1
-1
@@ -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;
|
||||
|
||||