- fixed off-by-two error in unix_name function (#480112)

This commit is contained in:
Adam Tkac 2009-01-21 18:40:47 +00:00
parent 1cae03757e
commit bf192e3b06
2 changed files with 18 additions and 1 deletions

View File

@ -1,7 +1,7 @@
Summary: Programs for accessing MS-DOS disks without mounting the disks Summary: Programs for accessing MS-DOS disks without mounting the disks
Name: mtools Name: mtools
Version: 4.0.0 Version: 4.0.0
Release: 2%{?dist} Release: 3%{?dist}
License: GPLv2+ License: GPLv2+
Group: Applications/System Group: Applications/System
Source: http://mtools.linux.lu/mtools-%{version}.tar.bz2 Source: http://mtools.linux.lu/mtools-%{version}.tar.bz2
@ -9,6 +9,7 @@ Url: http://mtools.linux.lu/
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch0: mtools-3.9.6-config.patch Patch0: mtools-3.9.6-config.patch
Patch3: mtools-3.9.7-bigdisk.patch Patch3: mtools-3.9.7-bigdisk.patch
Patch4: mtools400-rh480112.patch
Requires: info Requires: info
BuildRequires: texinfo, autoconf BuildRequires: texinfo, autoconf
@ -25,6 +26,7 @@ Mtools should be installed if you need to use MS-DOS disks
%setup -q -n %{name}-%{version} %setup -q -n %{name}-%{version}
%patch0 -p1 %patch0 -p1
%patch3 -p1 -b .big %patch3 -p1 -b .big
%patch4 -p1 -b .rh480112
# Correct system paths # Correct system paths
for all in mtools.5 mtools.texi; do for all in mtools.5 mtools.texi; do
@ -69,6 +71,9 @@ fi
%{_infodir}/%{name}.info.gz %{_infodir}/%{name}.info.gz
%changelog %changelog
* Wed Jan 21 2009 Adam Tkac <atkac redhat com> 4.0.0-3
- fixed off-by-two error in unix_name function (#480112)
* Mon Jan 12 2009 Adam Tkac <atkac redhat com> 4.0.0-2 * Mon Jan 12 2009 Adam Tkac <atkac redhat com> 4.0.0-2
- don't ship infodir/dir.gz (#478322) - don't ship infodir/dir.gz (#478322)

12
mtools400-rh480112.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up mtools-4.0.0/file_name.c.rh480112 mtools-4.0.0/file_name.c
--- mtools-4.0.0/file_name.c.rh480112 2009-01-21 19:35:08.000000000 +0100
+++ mtools-4.0.0/file_name.c 2009-01-21 19:35:36.000000000 +0100
@@ -145,7 +145,7 @@ void dos_name(doscp_t *toDos, const char
wchar_t *unix_name(doscp_t *dosCp,
const char *base, const char *ext, char Case, wchar_t *ret)
{
- char *s, tname[9], text[4], ans[11];
+ char *s, tname[9], text[4], ans[13];
int i;
strncpy(tname, base, 8);