diff options
author | Pali Rohár | 2017-11-09 19:03:34 +0100 |
---|---|---|
committer | Pali Rohár | 2017-11-09 19:03:34 +0100 |
commit | e526f503918cc29d8b1ccf36a5c3a34645d2be6e (patch) | |
tree | a8e6ed33bd77bcc6e05fa65d93c7c6a393b8de30 /libblkid | |
parent | libmount: fix access() utab write test (diff) | |
download | kernel-qcow2-util-linux-e526f503918cc29d8b1ccf36a5c3a34645d2be6e.tar.gz kernel-qcow2-util-linux-e526f503918cc29d8b1ccf36a5c3a34645d2be6e.tar.xz kernel-qcow2-util-linux-e526f503918cc29d8b1ccf36a5c3a34645d2be6e.zip |
libblkid: vfat: Fix reading labels which starts with byte 0x05
When FAT directory entry has leading byte 0x05 it is interpreted as byte
0xE5. This is how FAT stores file name which starts with byte 0xE5 as
leading byte in 0xE5 in FAT directory entry means that file slot is empty.
Fixes: #533
Diffstat (limited to 'libblkid')
-rw-r--r-- | libblkid/src/superblocks/vfat.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libblkid/src/superblocks/vfat.c b/libblkid/src/superblocks/vfat.c index 0cdd2bac7..3aeba018a 100644 --- a/libblkid/src/superblocks/vfat.c +++ b/libblkid/src/superblocks/vfat.c @@ -165,6 +165,8 @@ static unsigned char *search_fat_label(blkid_probe pr, if ((ent->attr & (FAT_ATTR_VOLUME_ID | FAT_ATTR_DIR)) == FAT_ATTR_VOLUME_ID) { DBG(LOWPROBE, ul_debug("\tfound fs LABEL at entry %d", i)); + if (ent->name[0] == 0x05) + ent->name[0] = 0xE5; return ent->name; } } |