chain.c32: fix test for partition types which can be hiddensyslinux-3.71-pre11
commitb5f0b61236a5300fe425cf80b11c5bc0006873c7
authorSergey Vlasov <vsu@altlinux.ru>
Wed, 16 Jul 2008 11:13:21 +0000 (16 15:13 +0400)
committerH. Peter Anvin <hpa@zytor.com>
Wed, 16 Jul 2008 15:27:41 +0000 (16 08:27 -0700)
treeea12baf8431df35f7bcc3fa356a86dd9abc2d0a4
parentc4e683cea05b735fe793a5fe0f49584db3a5c67c
chain.c32: fix test for partition types which can be hidden

The result of shift in C is undefined if the shift count is greater
than the width of type.  On x86 the corresponding CPU instruction
masks the shift count with 0x1f, therefore (mask >> (t & ~0x10)) & 1)
gives false positives for types greater than 0x1f (e.g., the partition
type 0x8e (Linux LVM) could be "hidden" to 0x9e).

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
com32/modules/chain.c