Re: libblkid: udf: Incorrect implementation of Unicode strings

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

 



On Wed, May 17, 2017 at 08:50:48PM +0200, Pali Rohár wrote:
> Still, more UDF disks created by Nero, new mkudffs or new udfclient have 
> only hexdigits stored in VolSetID. So it is better to use them directly 
> instead of encoding hexdigits characters via %02x.

OK, I see.

> I tried to modify current algorithm to take UTF-8 representation for its 
> input (therefore correctly handle both 8bit and 16bit OSTA Unicode) and 
> honor above hexdigits in VolSetID.
> 
> Please look at review my proposed changes:
> https://github.com/karelzak/util-linux/pull/439

Looks good.

It seems the most invasive change (in many cases) is the tolower() :-)
IMHO it's good idea to generate normalized UUID.

> > The another option would be use some hash sum to standardize
> > arbitrary number of bytes (for example we use MD5 to generate UUID
> > for libblkid/src/superblocks/hfs.c). In this case we can use also
> > some another bytes from the header, for example
> > volume_descriptor.tag. The disadvantage is dependence on checksum
> > code, so bad portability to another projects (grub, etc.).
> 
> Looks like too complicated, specially decision on checksum/hash function 
> could be problematic to implement in other projects. Probably hash 
> functions does not have to be fast (even there are fast MD5 
> implementations).

Yes, the portability to the another projects is painful in this case.

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux