This commit is contained in:
Jakub Jelinek 2005-12-18 19:53:37 +00:00
parent a2d3be124e
commit c1365201be
2 changed files with 21 additions and 3 deletions

View File

@ -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)

View File

@ -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 <jkeating@redhat.com>
- rebuilt
* Sun Dec 16 2005 Jakub Jelinek <jakub@redhat.com> 2.11-4
- rebuilt with GCC 4.1
- make it build with -D_FORTIFY_SOURCE=2
* Sun Nov 06 2005 Peter Vrabec <pvrabec@redhat.com> 2.11-3
- fix LFS (#172369)