[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 18/21] vvfat: initialize memory after allocating it
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 18/21] vvfat: initialize memory after allocating it |
Date: |
Tue, 18 Jul 2017 16:18:03 +0200 |
From: Hervé Poussineau <address@hidden>
This prevents some host to guest memory content leaks.
Fixes: https://bugs.launchpad.net/qemu/+bug/1599539
Signed-off-by: Hervé Poussineau <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/vvfat.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/vvfat.c b/block/vvfat.c
index ea7775f..6b11596 100644
--- a/block/vvfat.c
+++ b/block/vvfat.c
@@ -115,6 +115,7 @@ static inline int array_ensure_allocated(array_t* array,
int index)
array->pointer = g_realloc(array->pointer, new_size);
if (!array->pointer)
return -1;
+ memset(array->pointer + array->size, 0, new_size - array->size);
array->size = new_size;
array->next = index + 1;
}
--
1.8.3.1
- [Qemu-devel] [PULL 10/21] block: List anonymous device BBs in query-block, (continued)
- [Qemu-devel] [PULL 10/21] block: List anonymous device BBs in query-block, Kevin Wolf, 2017/07/18
- [Qemu-devel] [PULL 11/21] ide: bdrv_attach_dev() for empty CD-ROM, Kevin Wolf, 2017/07/18
- [Qemu-devel] [PULL 14/21] qemu-iotests: Test unplug of -device without drive, Kevin Wolf, 2017/07/18
- [Qemu-devel] [PULL 12/21] scsi-disk: bdrv_attach_dev() for empty CD-ROM, Kevin Wolf, 2017/07/18
- [Qemu-devel] [PULL 15/21] vvfat: add constants for special values of name[0], Kevin Wolf, 2017/07/18
- [Qemu-devel] [PULL 16/21] vvfat: add a constant for bootsector name, Kevin Wolf, 2017/07/18
- [Qemu-devel] [PULL 17/21] vvfat: correctly parse non-ASCII short and long file names, Kevin Wolf, 2017/07/18
- [Qemu-devel] [PULL 13/21] qemu-iotests: Test 'info block', Kevin Wolf, 2017/07/18
- [Qemu-devel] [PULL 19/21] block/vvfat: Fix compiler warning with gcc 7, Kevin Wolf, 2017/07/18
- [Qemu-devel] [PULL 20/21] blockdev: move BDRV_O_NO_BACKING option forward, Kevin Wolf, 2017/07/18
- [Qemu-devel] [PULL 18/21] vvfat: initialize memory after allocating it,
Kevin Wolf <=
- [Qemu-devel] [PULL 21/21] qemu-img: Check for backing image if specified during create, Kevin Wolf, 2017/07/18
- Re: [Qemu-devel] [PULL 00/21] Block layer patches, no-reply, 2017/07/18
- Re: [Qemu-devel] [PULL 00/21] Block layer patches, no-reply, 2017/07/18
- Re: [Qemu-devel] [PULL 00/21] Block layer patches, Peter Maydell, 2017/07/19