On 8/12/26 11:24 AM, [email protected] wrote:
The ${#name} call site in subst.c passes a plain char to legal_variable_starter. Since 9c8a70bc that expression indexes sh_syntaxtab directly, so on a platform with signed char a byte >= 0x80 becomes a negative subscript; UBSan reports it asindex -61 out of bounds for type 'int [256]'for the first byte of a two-byte UTF-8 sequence.
Thanks for the report.
--
``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
