Re: [PATCH] libblkid: fix overflow in implicit constant conversion

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

 



On Sun, Dec 17, 2017 at 06:45:50AM +0000, Sami Kerola wrote:
> -static const char bcache_magic[] = {
> +static const uint8_t bcache_magic[] = {
>  	0xc6, 0x85, 0x73, 0xf6, 0x4e, 0x1a, 0x45, 0xca,
>  	0x82, 0x65, 0xf5, 0x7f, 0x48, 0xba, 0x6d, 0x81
>  };

Well, libblkid assumes magic number as a string, and it seems we do
not need the variable bcache_magic[] in the code at all. So I have
committed:

    -#define BCACHE_SB_MAGIC     bcache_magic
    +#define BCACHE_SB_MAGIC     "\xc6\x85\x73\xf6\x4e\x1a\x45\xca\x82\x65\xf5\x7f\x48\xba\x6d\x81"

etc.

  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