From 27e7efb107af03f91bb04ffd976623545bfb06566b92709f4647a70c122d8119 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Thu, 17 Mar 2011 10:11:49 +0000 Subject: [PATCH] - fixed crash caused with access of invalid memory [bnc#679459] OBS-URL: https://build.opensuse.org/package/show/Base:System/mtools?expand=0&rev=19 --- mtools-4.0.15-invalid-memory.diff | 13 +++++++++++++ mtools.changes | 5 +++++ mtools.spec | 6 ++++-- 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 mtools-4.0.15-invalid-memory.diff diff --git a/mtools-4.0.15-invalid-memory.diff b/mtools-4.0.15-invalid-memory.diff new file mode 100644 index 0000000..9fc18e0 --- /dev/null +++ b/mtools-4.0.15-invalid-memory.diff @@ -0,0 +1,13 @@ +Index: mtools-4.0.15/fat.c +=================================================================== +--- mtools-4.0.15.orig/fat.c ++++ mtools-4.0.15/fat.c +@@ -468,7 +468,7 @@ void fat_write(Fs_t *This) + set_dword(infoSector->signature2, INFOSECT_SIGNATURE2); + set_dword(infoSector->pos, This->last); + set_dword(infoSector->count, This->freeSpace); +- set_dword(infoSector->signature3, 0xaa55); ++ set_word(infoSector->signature3, 0xaa55); + if(forceWriteSector(This, (char *)infoSector, This->infoSectorLoc, 1) != + (signed int) This->sector_size) + fprintf(stderr,"Trouble writing the info sector\n"); diff --git a/mtools.changes b/mtools.changes index dac9082..f6db0d6 100644 --- a/mtools.changes +++ b/mtools.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Mar 17 11:13:49 CET 2011 - pgajdos@suse.cz + +- fixed crash caused with access of invalid memory [bnc#679459] + ------------------------------------------------------------------- Tue Nov 16 11:57:57 CET 2010 - pgajdos@suse.cz diff --git a/mtools.spec b/mtools.spec index 5c7242e..f7d528d 100644 --- a/mtools.spec +++ b/mtools.spec @@ -1,5 +1,5 @@ # -# spec file for package mtools (Version 4.0.13) +# spec file for package mtools (Version 4.0.15) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -21,7 +21,7 @@ Name: mtools BuildRequires: libpng texlive-latex xorg-x11 xorg-x11-devel Version: 4.0.15 -Release: 2 +Release: 1 AutoReqProv: on Group: System/Filesystems License: GPLv2+ @@ -33,6 +33,7 @@ Patch1: %{name}-%{version}-autoconf.diff Patch3: %{name}-%{version}-aliasing.diff Patch4: %{name}-%{version}-fat-bits.diff Patch5: %{name}-%{version}-prototypes.diff +Patch6: %{name}-%{version}-invalid-memory.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -93,6 +94,7 @@ Authors: %patch3 %patch4 %patch5 +%patch6 -p1 %build %{suse_update_config -f}