On 9/14/25 1:50 AM, Grisha Levit wrote:
ansic_quote calls mbrtowc with a NULL parser state argument. This uses a static anonymous shift state that ends up in an undefined state after an invalid sequence. AFAICT most libcs handle UTF-8 conversions with the static state just fine, but on Android [1] the bionic libc implementation will, in fact, produce incorrect results if the state is reused after an invalid sequence:
Thanks for the report. I suppose the state is technically undefined after
an invalid wide character.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature
