From c1365201be0386946c2a80dd71b2c99fcdc73766 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Dec 18 2005 19:53:37 +0000 Subject: 2.11-4 --- diff --git a/dosfstools-2.11-fortify.patch b/dosfstools-2.11-fortify.patch new file mode 100644 index 0000000..90535ab --- /dev/null +++ b/dosfstools-2.11-fortify.patch @@ -0,0 +1,15 @@ +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. + +--- dosfstools-2.11/mkdosfs/mkdosfs.c.jj 2005-12-18 14:49:16.000000000 -0500 ++++ dosfstools-2.11/mkdosfs/mkdosfs.c 2005-12-18 14:49:16.000000000 -0500 +@@ -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) diff --git a/dosfstools.spec b/dosfstools.spec index 05c0671..5951056 100644 --- a/dosfstools.spec +++ b/dosfstools.spec @@ -1,13 +1,14 @@ Name: dosfstools Summary: Utilities for making and checking MS-DOS FAT filesystems on Linux. Version: 2.11 -Release: 3.1 +Release: 4 License: GPL Group: Applications/System Source: ftp://ftp.uni-erlangen.de/pub/Linux/LOCAL/dosfstools/dosfstools-%{version}.src.tar.gz Patch1: dosfstools-2.7-argfix.patch Patch2: dosfstools-2.11-assumeKernel26.patch Patch3: dosfstools-2.11-lseek.patch +Patch4: dosfstools-2.11-fortify.patch BuildRoot: %{_tmppath}/%{name}-root Obsoletes: mkdosfs-ygg @@ -21,6 +22,7 @@ drives or on floppies. %patch1 -p1 -b .argfix %patch2 -p1 -b .assumeKernel26 %patch3 -p1 -b .lseek +%patch4 -p1 -b .fortify %build make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS -Dllseek=lseek64 -D_LARGEFILE64_SOURCE" @@ -54,8 +56,9 @@ rm -rf %{buildroot} %{_mandir}/man8/* %changelog -* Fri Dec 09 2005 Jesse Keating -- rebuilt +* Sun Dec 16 2005 Jakub Jelinek 2.11-4 +- rebuilt with GCC 4.1 +- make it build with -D_FORTIFY_SOURCE=2 * Sun Nov 06 2005 Peter Vrabec 2.11-3 - fix LFS (#172369)