Re: dmesg: fix segfqult

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

 



On Mon, Jul 18, 2011 at 12:45, Marc-Antoine Perennou wrote:
> -               size_t len = mbrtowc(&wc, p, size - i, &s);
> +               int len = mbrtowc(&wc, p, size - i, &s);

this is wrong for systems where sizeof(size_t) != sizeof(int).  i
think you want to fix the code like the man page indicates ... do "if
(len < (size_t)-1) ....."
-mike
--
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