info-mtools
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Info-mtools] mlabel incorrectly handles apostrophe character


From: Pali Rohár
Subject: [Info-mtools] mlabel incorrectly handles apostrophe character
Date: Sat, 27 Oct 2018 11:26:33 +0200
User-agent: NeoMutt/20170113 (1.7.2)

Hello!

I found another bug in mlabel utility.

When you set a new label which contains apostrophe (') character then
mlabel generates some nonsense LFN entries in FAT root directory.

Seems that it tries to encode label entry as LFN and then stores
everything into root directory. But label cannot be LFN, also due to
fact that LFN entry is marked with volume label attribute too.

Steps to reproduce:

1. Create a FAT filesystem image in file fat

2. Set a new label with apostrophe (') character via mlabel:

  $ mlabel ::"ABC'D" -i fat

3. Query newly set label via various utilities:

  $ mlabel -s :: -i fat
   Volume label is ABC'D (abbr=ABC_D~1    )
  $ /sbin/blkid -o value -s LABEL fat
  ABC_D~1
  $ /sbin/fatlabel fat
  ABC_D~1

So it can be seen that volume label is incorrectly stored as none of
utilities can read it correctly.

-- 
Pali Rohár
address@hidden

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]