Package: dosfstools Version: 2.11-2.3 Severity: normal Tags: patch
I get a segmentation fault in mkdosfs if I specify a backup sector. $ mkfs.vfat -vb6 test.img mkfs.vfat 2.11 (12 Mar 2005) Segmentation fault With the attached patch it works, I just added a colon to the getopt's optstring. $ data/src/dosfstools/dosfstools-2.11/mkdosfs/mkdosfs -vb6 test.img mkdosfs 2.11 (12 Mar 2005) test.img has 64 heads and 32 sectors per track, logical sector size is 512, using 0xf8 media descriptor, with 16384 sectors; file system has 2 12-bit FATs and 8 sectors per cluster. FAT size is 6 sectors, and provides 2042 clusters. Root directory contains 512 slots. Volume ID is 4820a654, no volume label. HTH -- Adonikam Virgo
diff -urN dosfstools-2.11.orig/mkdosfs/mkdosfs.c dosfstools-2.11/mkdosfs/mkdosfs.c --- dosfstools-2.11.orig/mkdosfs/mkdosfs.c 2005-03-12 16:12:16.000000000 +0000 +++ dosfstools-2.11/mkdosfs/mkdosfs.c 2008-05-06 19:35:40.000000000 +0100 @@ -1439,7 +1439,7 @@ printf ("%s " VERSION " (" VERSION_DATE ")\n", program_name); - while ((c = getopt (argc, argv, "AbcCf:F:Ii:l:m:n:r:R:s:S:h:v")) != EOF) + while ((c = getopt (argc, argv, "Ab:cCf:F:Ii:l:m:n:r:R:s:S:h:v")) != EOF) /* Scan the command line for options */ switch (c) {