[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 19/22] qcow2: mark this file's sole strncpy use as j
From: |
Jim Meyering |
Subject: |
[Qemu-devel] [PATCH 19/22] qcow2: mark this file's sole strncpy use as justified |
Date: |
Wed, 9 May 2012 11:24:03 +0200 |
From: Jim Meyering <address@hidden>
Signed-off-by: Jim Meyering <address@hidden>
---
block/qcow2.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/qcow2.c b/block/qcow2.c
index 8c60a6f..abc985e 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -990,6 +990,7 @@ int qcow2_update_header(BlockDriverState *bs)
goto fail;
}
+ /* Using strncpy is ok here, since buf is not NUL-terminated. */
strncpy(buf, bs->backing_file, buflen);
header->backing_file_offset = cpu_to_be64(buf - ((char*) header));
--
1.7.10.1.487.ga3935e6
- Re: [Qemu-devel] [PATCH 08/22] linux-user: remove two unchecked uses of strdup, (continued)
[Qemu-devel] [PATCH 03/22] vmdk: relative_path: avoid buffer overrun, Jim Meyering, 2012/05/09
[Qemu-devel] [PATCH 13/22] virtio-9p: avoid unwarranted use of strncpy, Jim Meyering, 2012/05/09
[Qemu-devel] [PATCH 05/22] lm32: avoid buffer overrun, Jim Meyering, 2012/05/09
[Qemu-devel] [PATCH 19/22] qcow2: mark this file's sole strncpy use as justified,
Jim Meyering <=
[Qemu-devel] [PATCH 21/22] scsi: mark an strncpy use as valid, Jim Meyering, 2012/05/09
Re: [Qemu-devel] strncpy: best avoided (resend), Kevin Wolf, 2012/05/10