diff --git a/mtools-memset.patch b/mtools-memset.patch new file mode 100644 index 0000000..c517653 --- /dev/null +++ b/mtools-memset.patch @@ -0,0 +1,13 @@ +--- mtools-3.9.9/fat.c.memset 2005-03-21 11:23:10.000000000 +0000 ++++ mtools-3.9.9/fat.c 2005-03-21 11:23:36.000000000 +0000 +@@ -437,8 +437,8 @@ + InfoSector_t *infoSector; + infoSector = (InfoSector_t *) safe_malloc(This->sector_size); + set_dword(infoSector->signature1, INFOSECT_SIGNATURE1); +- memset(infoSector->filler1, sizeof(infoSector->filler1),0); +- memset(infoSector->filler2, sizeof(infoSector->filler2),0); ++ memset(infoSector->filler1, 0, sizeof(infoSector->filler1)); ++ memset(infoSector->filler2, 0, sizeof(infoSector->filler2)); + set_dword(infoSector->signature2, INFOSECT_SIGNATURE2); + set_dword(infoSector->pos, This->last); + set_dword(infoSector->count, This->freeSpace); diff --git a/mtools.spec b/mtools.spec index 3a5df51..4d24df3 100644 --- a/mtools.spec +++ b/mtools.spec @@ -13,6 +13,7 @@ Patch2: mtools-gcc4.patch Patch3: mtools-3.9.7-bigdisk.patch Patch4: mtools-3.9.9-noargs.patch Patch5: mtools-3.9.9-badc.patch +Patch6: mtools-memset.patch Prereq: /sbin/install-info BuildRequires: texinfo @@ -33,6 +34,7 @@ Mtools should be installed if you need to use MS-DOS disks. %patch3 -p1 -b .big %patch4 -p1 -b .noargs %patch5 -p1 -b .badc +%patch6 -p1 -b .memset %build %configure @@ -68,6 +70,9 @@ fi %{_infodir}/* %changelog +* Mon Mar 21 2005 Tim Waugh +- Fixed memset() usage bug. + * Tue Mar 15 2005 Tim Waugh 3.9.9-12 - Fix build (bug #151135).