[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-libunistring] Avoiding heap allocations in ‘u32_conv_from_encod
From: |
Ludovic Courtès |
Subject: |
Re: [bug-libunistring] Avoiding heap allocations in ‘u32_conv_from_encoding’ |
Date: |
Tue, 13 Jul 2010 23:59:20 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Hello Bruno!
Bruno Haible <address@hidden> writes:
> Ludovic Courtès wrote in
> <http://lists.gnu.org/archive/html/bug-libunistring/2010-07/msg00003.html>:
>> In the example below, conversion from UTF-8 to UCS-4 succeeds but
>> ‘u32_conv_from_encoding’ allocates memory on the heap although the
>> supplied buffer appears to be large enough:
>
> I'm applying this fix in gnulib. The fix will be contained in the next
> libunistring release.
Cool, thanks!
Can you also comment on this:
> BTW, it’s unclear to me from the manual whether RESULT_LEN above should
> be the size in bytes or the size in uint32_t.
Ludo’.