libxenguest: fix off-by-1 in colo-secondary-bitmap merging

Valid GFNs (having a representation in the dirty bitmap) need to be
strictly below p2m_size.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
Jan Beulich committed 2021-08-13 16:49:46 +02:00
1 parent 1a838bf725
commit e241d15f1c
1 file changed
+1 -1
+1 -1
View File
@@ -614,7 +614,7 @@ static int colo_merge_secondary_dirty_bitmap(struct xc_sr_context *ctx)
for ( i = 0; i < count; i++ )
{
pfn = pfns[i];
if ( pfn > ctx->save.p2m_size )
if ( pfn >= ctx->save.p2m_size )
{
PERROR("Invalid pfn 0x%" PRIx64, pfn);
rc = -1;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.