summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJinWang An <jinwang.an@samsung.com>2022-12-26 13:14:06 +0900
committerJinWang An <jinwang.an@samsung.com>2022-12-26 13:14:06 +0900
commit43faab009aefa5beeaa7c8abc6dcca705507ace7 (patch)
treef38dc64afc851fbf15ee3be966634eb11c9d2113
parentc32e05cf546485e759f6280adb5345785a9c1dfb (diff)
downloaddosfstools-upstream/3.0.27.tar.gz
dosfstools-upstream/3.0.27.tar.bz2
dosfstools-upstream/3.0.27.zip
Imported Upstream version 3.0.27upstream/3.0.27
-rw-r--r--ChangeLog75
-rw-r--r--VERSION2
-rw-r--r--manpages/de/fatlabel.de.82
-rw-r--r--manpages/de/fsck.fat.de.82
-rw-r--r--manpages/de/mkfs.fat.de.82
-rw-r--r--manpages/en/fatlabel.82
-rw-r--r--manpages/en/fsck.fat.82
-rw-r--r--manpages/en/mkfs.fat.82
-rw-r--r--manpages/po/de/fatlabel.8.po6
-rw-r--r--manpages/po/de/fsck.fat.8.po6
-rw-r--r--manpages/po/de/mkfs.fat.8.po6
-rw-r--r--manpages/pot/fatlabel.8.pot6
-rw-r--r--manpages/pot/fsck.fat.8.pot6
-rw-r--r--manpages/pot/mkfs.fat.8.pot6
-rw-r--r--src/boot.c4
-rw-r--r--src/check.c2
-rw-r--r--src/fsck.fat.c1
-rw-r--r--src/version.h4
18 files changed, 104 insertions, 32 deletions
diff --git a/ChangeLog b/ChangeLog
index 6807d23..8616201 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,77 @@
-commit 6893c45 (HEAD, origin/master, origin/HEAD, master)
+commit e2c8f06 (HEAD, origin/master, master)
+Author: Andreas Bombe <aeb@debian.org>
+Date: Wed Nov 12 00:22:17 2014 +0100
+
+ fsck.fat: Don't print version string every time -v is encountered
+
+ Remove the printing of the version string every time -v is seen during
+ command line parsing in fsck.fat. The version string is printed anyway
+ before opening the filesystem device/image.
+
+ Signed-off-by: Andreas Bombe <aeb@debian.org>
+
+commit 82076b6
+Author: Andreas Bombe <aeb@debian.org>
+Date: Tue Nov 11 23:25:30 2014 +0100
+
+ Fix attempt to rename root dir in fsck due to uninitialized fields
+
+ When add_file() is called with offset 0, it will construct a DIR_ENT for
+ the root directory instead of reading the contents from the filesystem.
+ It did not initialize the whole DIR_ENT on the stack, just select
+ values.
+
+ In particular, the lcase field was left with an undefined value. If
+ that value happened to include the FAT_NO_83NAME bit, the "neither long
+ nor short file name" check in bad_name() added in 3.0.26 would trigger
+ and cause an attempt to rename the entry (which is not possible).
+ Example run:
+
+ $ /sbin/fsck.fat -y bad.img
+ fsck.fat 3.0.26 (2014-03-07)
+ /
+ Bad short file name ().
+ Auto-renaming it.
+ Renamed to
+ bad.img: 14 files, 19388/403266 clusters
+
+ This commit changes the initialization zeroize the whole struct before
+ setting individual fields. Thanks to AlexisM, who found the cause and
+ posted a patch on the Debian bug http://bugs.debian.org/764992 .
+
+ Signed-off-by: Andreas Bombe <aeb@debian.org>
+
+commit c24ecb6
+Author: Andreas Bombe <aeb@debian.org>
+Date: Tue Nov 11 22:49:50 2014 +0100
+
+ Support long file names in volume labeling code
+
+ The code to find the volume label directory entry in find_volume_de()
+ did not consider long file names so far. Directory entries that make up
+ long file names have four attribute bits set, including the "volume"
+ bit.
+
+ This caused the code to mistake a directory entry that is part of a
+ long file name as the volume name entry. If such an entry is found
+ first, fatlabel would print garbage when asked to display the label and
+ mangle the long file name when asked to set it. The latter would lead
+ to the loss of the long file name and require a fsck to clean up.
+
+ Change so that the set of attributes equal that of LFN entries will no
+ langer match as a volume label.
+
+ Signed-off-by: Andreas Bombe <aeb@debian.org>
+
+commit 1646f6e (tag: v3.0.26)
+Author: Daniel Baumann <mail@daniel-baumann.ch>
+Date: Fri Mar 7 18:40:13 2014 +0100
+
+ Releasing version 3.0.26.
+
+ Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
+
+commit 6893c45
Author: Dir Lotter <dirk.lotter@siemens.com>
Date: Fri Mar 7 18:25:39 2014 +0100
diff --git a/VERSION b/VERSION
index 2551016..d0ecf17 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.0.26
+3.0.27
diff --git a/manpages/de/fatlabel.de.8 b/manpages/de/fatlabel.de.8
index 8c9802b..d819a13 100644
--- a/manpages/de/fatlabel.de.8
+++ b/manpages/de/fatlabel.de.8
@@ -24,7 +24,7 @@
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
-.TH FATLABEL 8 2014\-03\-07 3.0.26 dosfstools
+.TH FATLABEL 8 2014\-11\-12 3.0.27 dosfstools
.SH NAME
\fBfatlabel\fP \- set or get MS\-DOS filesystem label
diff --git a/manpages/de/fsck.fat.de.8 b/manpages/de/fsck.fat.de.8
index 674a51f..1d96e23 100644
--- a/manpages/de/fsck.fat.de.8
+++ b/manpages/de/fsck.fat.de.8
@@ -24,7 +24,7 @@
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
-.TH FSCK.FAT 8 2014\-03\-07 3.0.26 dosfstools
+.TH FSCK.FAT 8 2014\-11\-12 3.0.27 dosfstools
.SH NAME
\fBfsck.fat\fP \- check and repair MS\-DOS filesystems
diff --git a/manpages/de/mkfs.fat.de.8 b/manpages/de/mkfs.fat.de.8
index 6d81c4f..5a6eb1a 100644
--- a/manpages/de/mkfs.fat.de.8
+++ b/manpages/de/mkfs.fat.de.8
@@ -24,7 +24,7 @@
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
-.TH MKFS.FAT 8 2014\-03\-07 3.0.26 dosfstools
+.TH MKFS.FAT 8 2014\-11\-12 3.0.27 dosfstools
.SH NAME
\fBmkfs.fat\fP \- create an MS\-DOS filesystem under Linux
diff --git a/manpages/en/fatlabel.8 b/manpages/en/fatlabel.8
index 341117b..6b50665 100644
--- a/manpages/en/fatlabel.8
+++ b/manpages/en/fatlabel.8
@@ -19,7 +19,7 @@
.\" can be found in /usr/share/common-licenses/GPL-3 file.
.\"
.\"
-.TH FATLABEL 8 2014\-03\-07 3.0.26 "dosfstools"
+.TH FATLABEL 8 2014\-11\-12 3.0.27 "dosfstools"
.SH NAME
\fBfatlabel\fR \- set or get MS\-DOS filesystem label
diff --git a/manpages/en/fsck.fat.8 b/manpages/en/fsck.fat.8
index af4b6ec..3d95dc8 100644
--- a/manpages/en/fsck.fat.8
+++ b/manpages/en/fsck.fat.8
@@ -19,7 +19,7 @@
.\" can be found in /usr/share/common-licenses/GPL-3 file.
.\"
.\"
-.TH FSCK.FAT 8 2014\-03\-07 3.0.26 "dosfstools"
+.TH FSCK.FAT 8 2014\-11\-12 3.0.27 "dosfstools"
.SH NAME
\fBfsck.fat\fR \- check and repair MS\-DOS filesystems
diff --git a/manpages/en/mkfs.fat.8 b/manpages/en/mkfs.fat.8
index d76d7a6..9dd8115 100644
--- a/manpages/en/mkfs.fat.8
+++ b/manpages/en/mkfs.fat.8
@@ -19,7 +19,7 @@
.\" can be found in /usr/share/common-licenses/GPL-3 file.
.\"
.\"
-.TH MKFS.FAT 8 2014\-03\-07 3.0.26 "dosfstools"
+.TH MKFS.FAT 8 2014\-11\-12 3.0.27 "dosfstools"
.SH NAME
\fBmkfs.fat\fR \- create an MS-DOS filesystem under Linux
diff --git a/manpages/po/de/fatlabel.8.po b/manpages/po/de/fatlabel.8.po
index 256d5ed..27c69f5 100644
--- a/manpages/po/de/fatlabel.8.po
+++ b/manpages/po/de/fatlabel.8.po
@@ -3,7 +3,7 @@
msgid ""
msgstr ""
"Project-Id-Version: dosfstools VERSION\n"
-"POT-Creation-Date: 2014-03-07 18:39+0100\n"
+"POT-Creation-Date: 2014-11-12 00:52+0100\n"
"PO-Revision-Date: 2013-06-06 09:34+0300\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
@@ -22,13 +22,13 @@ msgstr ""
#. type: TH
#: en/fatlabel.8:22 en/fsck.fat.8:22 en/mkfs.fat.8:22
#, no-wrap
-msgid "2014-03-07"
+msgid "2014-11-12"
msgstr ""
#. type: TH
#: en/fatlabel.8:22 en/fsck.fat.8:22 en/mkfs.fat.8:22
#, no-wrap
-msgid "3.0.26"
+msgid "3.0.27"
msgstr ""
#. type: TH
diff --git a/manpages/po/de/fsck.fat.8.po b/manpages/po/de/fsck.fat.8.po
index 70793da..3035906 100644
--- a/manpages/po/de/fsck.fat.8.po
+++ b/manpages/po/de/fsck.fat.8.po
@@ -3,7 +3,7 @@
msgid ""
msgstr ""
"Project-Id-Version: dosfstools VERSION\n"
-"POT-Creation-Date: 2014-03-07 18:39+0100\n"
+"POT-Creation-Date: 2014-11-12 00:52+0100\n"
"PO-Revision-Date: 2013-06-06 09:34+0300\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
@@ -16,13 +16,13 @@ msgstr ""
#. type: TH
#: en/fatlabel.8:22 en/fsck.fat.8:22 en/mkfs.fat.8:22
#, no-wrap
-msgid "2014-03-07"
+msgid "2014-11-12"
msgstr ""
#. type: TH
#: en/fatlabel.8:22 en/fsck.fat.8:22 en/mkfs.fat.8:22
#, no-wrap
-msgid "3.0.26"
+msgid "3.0.27"
msgstr ""
#. type: TH
diff --git a/manpages/po/de/mkfs.fat.8.po b/manpages/po/de/mkfs.fat.8.po
index dffecd5..2531179 100644
--- a/manpages/po/de/mkfs.fat.8.po
+++ b/manpages/po/de/mkfs.fat.8.po
@@ -3,7 +3,7 @@
msgid ""
msgstr ""
"Project-Id-Version: dosfstools VERSION\n"
-"POT-Creation-Date: 2014-03-07 18:39+0100\n"
+"POT-Creation-Date: 2014-11-12 00:52+0100\n"
"PO-Revision-Date: 2013-06-06 09:34+0300\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
@@ -16,13 +16,13 @@ msgstr ""
#. type: TH
#: en/fatlabel.8:22 en/fsck.fat.8:22 en/mkfs.fat.8:22
#, no-wrap
-msgid "2014-03-07"
+msgid "2014-11-12"
msgstr ""
#. type: TH
#: en/fatlabel.8:22 en/fsck.fat.8:22 en/mkfs.fat.8:22
#, no-wrap
-msgid "3.0.26"
+msgid "3.0.27"
msgstr ""
#. type: TH
diff --git a/manpages/pot/fatlabel.8.pot b/manpages/pot/fatlabel.8.pot
index 4b06bca..1d4af88 100644
--- a/manpages/pot/fatlabel.8.pot
+++ b/manpages/pot/fatlabel.8.pot
@@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: dosfstools VERSION\n"
-"POT-Creation-Date: 2014-03-07 18:39+0100\n"
+"POT-Creation-Date: 2014-11-12 00:52+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -25,13 +25,13 @@ msgstr ""
#. type: TH
#: en/fatlabel.8:22 en/fsck.fat.8:22 en/mkfs.fat.8:22
#, no-wrap
-msgid "2014-03-07"
+msgid "2014-11-12"
msgstr ""
#. type: TH
#: en/fatlabel.8:22 en/fsck.fat.8:22 en/mkfs.fat.8:22
#, no-wrap
-msgid "3.0.26"
+msgid "3.0.27"
msgstr ""
#. type: TH
diff --git a/manpages/pot/fsck.fat.8.pot b/manpages/pot/fsck.fat.8.pot
index 22ff5fa..e411819 100644
--- a/manpages/pot/fsck.fat.8.pot
+++ b/manpages/pot/fsck.fat.8.pot
@@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: dosfstools VERSION\n"
-"POT-Creation-Date: 2014-03-07 18:39+0100\n"
+"POT-Creation-Date: 2014-11-12 00:52+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -19,13 +19,13 @@ msgstr ""
#. type: TH
#: en/fatlabel.8:22 en/fsck.fat.8:22 en/mkfs.fat.8:22
#, no-wrap
-msgid "2014-03-07"
+msgid "2014-11-12"
msgstr ""
#. type: TH
#: en/fatlabel.8:22 en/fsck.fat.8:22 en/mkfs.fat.8:22
#, no-wrap
-msgid "3.0.26"
+msgid "3.0.27"
msgstr ""
#. type: TH
diff --git a/manpages/pot/mkfs.fat.8.pot b/manpages/pot/mkfs.fat.8.pot
index 98b36c0..a6106bc 100644
--- a/manpages/pot/mkfs.fat.8.pot
+++ b/manpages/pot/mkfs.fat.8.pot
@@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: dosfstools VERSION\n"
-"POT-Creation-Date: 2014-03-07 18:39+0100\n"
+"POT-Creation-Date: 2014-11-12 00:52+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -19,13 +19,13 @@ msgstr ""
#. type: TH
#: en/fatlabel.8:22 en/fsck.fat.8:22 en/mkfs.fat.8:22
#, no-wrap
-msgid "2014-03-07"
+msgid "2014-11-12"
msgstr ""
#. type: TH
#: en/fatlabel.8:22 en/fsck.fat.8:22 en/mkfs.fat.8:22
#, no-wrap
-msgid "3.0.26"
+msgid "3.0.27"
msgstr ""
#. type: TH
diff --git a/src/boot.c b/src/boot.c
index 45fb3c8..5b3825c 100644
--- a/src/boot.c
+++ b/src/boot.c
@@ -504,7 +504,7 @@ loff_t find_volume_de(DOS_FS * fs, DIR_ENT * de)
offset = cluster_start(fs, cluster);
for (i = 0; i * sizeof(DIR_ENT) < fs->cluster_size; i++) {
fs_read(offset, sizeof(DIR_ENT), de);
- if (de->attr & ATTR_VOLUME)
+ if (de->attr != VFAT_LN_ATTR && de->attr & ATTR_VOLUME)
return offset;
offset += sizeof(DIR_ENT);
}
@@ -513,7 +513,7 @@ loff_t find_volume_de(DOS_FS * fs, DIR_ENT * de)
for (i = 0; i < fs->root_entries; i++) {
offset = fs->root_start + i * sizeof(DIR_ENT);
fs_read(offset, sizeof(DIR_ENT), de);
- if (de->attr & ATTR_VOLUME)
+ if (de->attr != VFAT_LN_ATTR && de->attr & ATTR_VOLUME)
return offset;
}
}
diff --git a/src/check.c b/src/check.c
index a330caf..e8aaf92 100644
--- a/src/check.c
+++ b/src/check.c
@@ -959,9 +959,9 @@ static void add_file(DOS_FS * fs, DOS_FILE *** chain, DOS_FILE * parent,
fs_read(offset, sizeof(DIR_ENT), &de);
else {
/* Construct a DIR_ENT for the root directory */
+ memset(&de, 0, sizeof de);
memcpy(de.name, " ", MSDOS_NAME);
de.attr = ATTR_DIR;
- de.size = de.time = de.date = 0;
de.start = htole16(fs->root_cluster & 0xffff);
de.starthi = htole16((fs->root_cluster >> 16) & 0xffff);
}
diff --git a/src/fsck.fat.c b/src/fsck.fat.c
index ce6cee6..c073d9a 100644
--- a/src/fsck.fat.c
+++ b/src/fsck.fat.c
@@ -157,7 +157,6 @@ int main(int argc, char **argv)
break;
case 'v':
verbose = 1;
- printf("fsck.fat " VERSION " (" VERSION_DATE ")\n");
break;
case 'V':
verify = 1;
diff --git a/src/version.h b/src/version.h
index bf941bf..4ccc759 100644
--- a/src/version.h
+++ b/src/version.h
@@ -23,7 +23,7 @@
#ifndef _version_h
#define _version_h
-#define VERSION "3.0.26"
-#define VERSION_DATE "2014-03-07"
+#define VERSION "3.0.27"
+#define VERSION_DATE "2014-11-12"
#endif