Re: printf %ls conversion

2023-07-17 Thread Chet Ramey
On 7/17/23 3:19 AM, Grisha Levit wrote: The mbsrtowcs call here doesn't convert the final \0 of mbs, leaving the final byte of ws as whatever was just malloc-ed. Thanks for the report. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' -

printf %ls conversion

2023-07-17 Thread Grisha Levit
The mbsrtowcs call here doesn't convert the final \0 of mbs, leaving the final byte of ws as whatever was just malloc-ed. Noticed in an ASAN build which makes sure that this is never L'\0'. Oddly, this didn't actually trigger an ASAN report, just saw that nothing was getting printed by printf. --