From 07ef48724795f7d415bd07850d2440c327b28541 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 26 Sep 2008 13:41:14 +0200 Subject: [PATCH] Applying Fedoras dosfstools-2.11-fortify.patch from Jakub Jelinek to make it build with -D_FORTIFY_SOURCE=2: * This violates -D_FORTIFY_SOURCE=2 (which is stricter than C standard), but isn't actually any buffer overflow. But using memcpy is more efficient anyway. Signed-off-by: Daniel Baumann --- mkdosfs/mkdosfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdosfs/mkdosfs.c b/mkdosfs/mkdosfs.c index 28c7e3e..99bdf45 100644 --- a/mkdosfs/mkdosfs.c +++ b/mkdosfs/mkdosfs.c @@ -805,7 +805,7 @@ setup_tables (void) /* On Atari, the first few bytes of the boot sector are assigned * differently: The jump code is only 2 bytes (and m68k machine code * :-), then 6 bytes filler (ignored), then 3 byte serial number. */ - strncpy( bs.system_id-1, "mkdosf", 6 ); + memcpy( bs.system_id-1, "mkdosf", 6 ); else strcpy (bs.system_id, "mkdosfs"); if (sectors_per_cluster)