[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] libxc: don't pass uninitialized data to do_dm_op()
commit 78da0c2a7a9c621ba64e515528e11e5f28f15050 Author: Jan Beulich <JBeulich@xxxxxxxx> AuthorDate: Mon Feb 20 16:53:27 2017 +0000 Commit: Wei Liu <wei.liu2@xxxxxxxxxx> CommitDate: Mon Feb 20 16:53:27 2017 +0000 libxc: don't pass uninitialized data to do_dm_op() do_dm_op() expects (void *, size_t) pairs, but with nr being uint32_t the type of the expression of xc_hvm_track_dirty_vram()'s last argument to the function is only a 32 bits one. Neither C nor the ABI require the compiler to promote the type beyond int. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- tools/libxc/xc_misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxc/xc_misc.c b/tools/libxc/xc_misc.c index 0fc6c22..5159475 100644 --- a/tools/libxc/xc_misc.c +++ b/tools/libxc/xc_misc.c @@ -560,7 +560,7 @@ int xc_hvm_track_dirty_vram( data->nr = nr; return do_dm_op(xch, dom, 2, &op, sizeof(op), - dirty_bitmap, (nr + 7) / 8); + dirty_bitmap, (size_t)((nr + 7) / 8)); } int xc_hvm_modified_memory( -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |