Re: [PATCH] get_line fixes for wide characters and overflows

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

 



On Thu, Aug 01, 2013 at 01:57:03PM +0100, Dr. David Alan Gilbert wrote:
> e to
> >  reproduce the problem with the file from Suse bugzilla).
> 
> Hi Karel,
>   Thanks for the reply.  I'll give it a go over the weekend,
> but I don't think it can handle the wchar problems I described and fixed
> in my follow up patch. If a 4byte wchar hapens to land at the end of the buffer
> how do you guarantee the space?

 Ah, I probably see what you mean. So I have added p < &Line[LineLen - 1]
 check to the for() where the code copies the multibyte buffer to line buffer.
 See git tree for more details.

    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