File dosfstools-3.0.22-corrupt-fat.patch of Package dosfstools.openSUSE_13.1_Update
http://daniel-baumann.ch/gitweb/?p=software/dosfstools.git;a=commit;h=9e3a2b1e916d32ec28db9953bf5c54f9f4b9ad74 Index: src/fat.c =================================================================== --- src/fat.c.orig 2013-07-17 12:53:11.000000000 +0200 +++ src/fat.c 2014-03-17 10:23:39.791175689 +0100 @@ -28,6 +28,7 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <inttypes.h> #include "common.h" #include "fsck.fat.h" @@ -219,7 +220,7 @@ offs = fs->fat_start + cluster * 4; /* According to M$, the high 4 bits of a FAT32 entry are reserved and * are not part of the cluster number. So we never touch them. */ - *(unsigned long *)data = htole32((new & 0xfffffff) | + *(uint32_t *)data = htole32((new & 0xfffffff) | (curEntry.reserved << 28)); size = 4; }