Sure, looks good, I'll use your version.
On Wed, Nov 16, 2011 at 02:00:51PM +0100, Stefan Sperling wrote:
> On Tue, Nov 15, 2011 at 11:09:08PM +, Nicholas Marriott wrote:
> > Hi
> >
> > libedit miscalculates the amount of space needed for constructing it's
> > wchar_t version of argv, causin
On Tue, Nov 15, 2011 at 11:09:08PM +, Nicholas Marriott wrote:
> Hi
>
> libedit miscalculates the amount of space needed for constructing it's
> wchar_t version of argv, causing it to overrun the buffer.
>
> I don't see how the output of mbstowcs can be longer than
> (sum(strlen(argv)) * size
On Tue, Nov 15, 2011 at 11:09:08PM +, Nicholas Marriott wrote:
> Hi
>
> libedit miscalculates the amount of space needed for constructing it's
> wchar_t version of argv, causing it to overrun the buffer.
>
> I don't see how the output of mbstowcs can be longer than
> (sum(strlen(argv)) * size
Hi
libedit miscalculates the amount of space needed for constructing it's
wchar_t version of argv, causing it to overrun the buffer.
I don't see how the output of mbstowcs can be longer than
(sum(strlen(argv)) * sizeof (wchar_t)) so this fix should work:
ok?
Index: chartype.c
=