File hfsprogs-332.14-overflow.patch of Package hfsprogs

Index: diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SExtents.c
===================================================================
--- diskdev_cmds-332.14.orig/fsck_hfs.tproj/dfalib/SExtents.c	2006-02-20 22:45:15.000000000 +0100
+++ diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SExtents.c	2008-11-04 17:02:42.000000000 +0100
@@ -699,10 +699,10 @@ OSErr DeallocateFile(SVCB *vcb, CatalogR
 				(UInt32) (fileRec->hfsFile.rsrcExtents[i].blockCount);
 		}
 		ClearMemory(&dataForkExtents[i].startBlock,
-			sizeof(HFSPlusExtentRecord) - sizeof(HFSExtentRecord));
+			sizeof(HFSPlusExtentRecord) - 2*sizeof(HFSExtentRecord));
 
 		ClearMemory(&rsrcForkExtents[i].startBlock,
-			sizeof(HFSPlusExtentRecord) - sizeof(HFSExtentRecord));
+			sizeof(HFSPlusExtentRecord) - 2*sizeof(HFSExtentRecord));
 		
 		errDF = DeallocateFork(vcb, fileRec->hfsFile.fileID, kDataForkType,
 				dataForkExtents, &recordDeleted );
openSUSE Build Service is sponsored by