diff -up dosfstools-3.0.9/src/dosfslabel.c.old dosfstools-3.0.9/src/dosfslabel.c --- dosfstools-3.0.9/src/dosfslabel.c.old 2010-01-23 10:13:31.000000000 +0100 +++ dosfstools-3.0.9/src/dosfslabel.c 2011-04-05 10:56:24.642612056 +0200 @@ -85,7 +85,7 @@ static void check_atari( void ) int main(int argc, char *argv[]) { - DOS_FS fs; + DOS_FS fs = {0}; rw = 0; char *device = NULL; @@ -116,6 +116,8 @@ int main(int argc, char *argv[]) fs_open(device, rw); read_boot(&fs); + if (fs.fat_bits == 32) + read_fat(&fs); if (!rw) { fprintf(stdout, "%s\n", fs.label); exit(0); diff -up dosfstools-3.0.9/src/fat.c.old dosfstools-3.0.9/src/fat.c --- dosfstools-3.0.9/src/fat.c.old 2010-01-23 10:13:34.000000000 +0100 +++ dosfstools-3.0.9/src/fat.c 2011-04-05 10:57:22.659733090 +0200 @@ -89,8 +89,10 @@ void read_fat(DOS_FS *fs) unsigned long total_num_clusters; /* Clean up from previous pass */ - free(fs->fat); - free(fs->cluster_owner); + if (fs->fat) + free(fs->fat); + if (fs->cluster_owner) + free(fs->cluster_owner); fs->fat = NULL; fs->cluster_owner = NULL;