libblkid-tiny: vfat: Fix reading labels which starts with byte 0x05
[project/fstools.git] / libblkid-tiny / vfat.c
index 49b865adf0bce98923f929fa00364f6f93d85426..93e40530c897a56f9805ab41c07dd82cb013afe8 100644 (file)
@@ -167,6 +167,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;
                }
        }