[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] libxenguest: fix off-by-1 in colo-secondary-bitmap merging
commit e241d15f1c8a8a02baa401af857393f9ada5aeb3 Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Fri Aug 13 16:49:46 2021 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Fri Aug 13 16:49:46 2021 +0200 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@xxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- tools/libs/guest/xg_sr_save.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libs/guest/xg_sr_save.c b/tools/libs/guest/xg_sr_save.c index 3fce41b6cf..0266e0a94a 100644 --- a/tools/libs/guest/xg_sr_save.c +++ b/tools/libs/guest/xg_sr_save.c @@ -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; -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |