From 1786dc15eeecdc49a2097e262a9ad1510a14dcc0 Mon Sep 17 00:00:00 2001 From: Blue Swirl Date: Sat, 15 Aug 2009 11:33:58 +0000 Subject: [PATCH] Use pstrcpy to avoid OpenBSD linker warnings Signed-off-by: Blue Swirl --- block/vdi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/vdi.c b/block/vdi.c index db3fe1633a..4ca8dcb7dc 100644 --- a/block/vdi.c +++ b/block/vdi.c @@ -834,7 +834,7 @@ static int vdi_create(const char *filename, QEMUOptionParameter *options) bmap_size = ((bmap_size + SECTOR_SIZE - 1) & ~(SECTOR_SIZE -1)); memset(&header, 0, sizeof(header)); - strcpy(header.text, VDI_TEXT); + pstrcpy(header.text, sizeof(header.text), VDI_TEXT); header.signature = VDI_SIGNATURE; header.version = VDI_VERSION_1_1; header.header_size = 0x180; -- 2.34.1