|
From: | Vladimir Sementsov-Ogievskiy |
Subject: | Re: [Qemu-devel] [PATCH] block/qcow2-bitmap: fix use of uninitialized pointer |
Date: | Sat, 23 Sep 2017 14:04:24 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
22.09.2017 17:43, Vladimir Sementsov-Ogievskiy wrote:
Without initialization to zero dirty_bitmap field may be not zero for a bitmap which should not be stored and qcow2_store_persistent_dirty_bitmaps will erroneously call store_bitmap for it which leads to SYGSEGV on bdrv_dirty_bitmap_name.
please fix it to SIGSEGV...
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden> --- block/qcow2-bitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c index e8d3bdbd6e..14f41d0427 100644 --- a/block/qcow2-bitmap.c +++ b/block/qcow2-bitmap.c @@ -602,7 +602,7 @@ static Qcow2BitmapList *bitmap_list_load(BlockDriverState *bs, uint64_t offset, goto fail; }- bm = g_new(Qcow2Bitmap, 1);+ bm = g_new0(Qcow2Bitmap, 1); bm->table.offset = e->bitmap_table_offset; bm->table.size = e->bitmap_table_size; bm->flags = e->flags;
-- Best regards, Vladimir
[Prev in Thread] | Current Thread | [Next in Thread] |