qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCHv2 19/22] qcow2: mark this file's sole strncpy use as


From: Jim Meyering
Subject: [Qemu-devel] [PATCHv2 19/22] qcow2: mark this file's sole strncpy use as justified
Date: Wed, 30 May 2012 09:46:38 +0200

From: Jim Meyering <address@hidden>

Acked-by: Kevin Wolf <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 c2e49cd..6d34f1a 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -994,6 +994,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.2.605.gbefc5ed




reply via email to

[Prev in Thread] Current Thread [Next in Thread]