]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libblkid: udf: Fix parsing UDF revision
authorPali Rohár <pali.rohar@gmail.com>
Mon, 20 Nov 2017 17:16:59 +0000 (18:16 +0100)
committerPali Rohár <pali.rohar@gmail.com>
Mon, 20 Nov 2017 17:16:59 +0000 (18:16 +0100)
commit3999e62a72f46d525ee4cc10b18781468ace9b9c
tree6c7c73c415f665e5ea10a80968057b5cec0531ec
parent07306a030333938ed4b0c84d8304cba07cbd8e03
libblkid: udf: Fix parsing UDF revision

UDF revision is stored as decimal number in hexadecimal format.
E.g. number 0x0150 is revision 1.50, number 0x0201 is revision 2.01.

Apparently all UDF test images have number which has same representation in
decimal and hexadecimal format, so problem was not detected.

This patch adds new test image with UDF revision 1.50. Internally number is
stored as 0x0150. In decimal format it is (incorrectly) 1.80, but in
hexadecimal correct 1.50.

$ dd if=/dev/zero of=udf-hdd-mkudffs-1.3-8.img bs=1M count=10
$ mkudffs -r 0x150 -b 512 udf-hdd-mkudffs-1.3-8.img

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
libblkid/src/superblocks/udf.c
tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-8 [new file with mode: 0644]
tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-8.img.xz [new file with mode: 0644]