Re: [PATCH] multibyte_identifiers: opt-in UTF-8 variable names (UAX #31 + NFC) behind a root-controlled system switch

Chet Ramey <[email protected]>
Newsgroups gmane.comp.shells.bash.bugs
Organization ITS, Case Western Reserve University
Message-ID <[email protected]>
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 as
> 
>      index -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 (application/pgp-signature, 203 B)
-----BEGIN PGP SIGNATURE-----

wmMEABEIACMWIQR8ATX7CIqvbGbGULm7WGnwZOp0qwUCan358gUDAAAAAAAKCRC7WGnwZOp0q7RN
AJoDT6RdoMnmob7aCa/xybNUsEVMXQCfaFUoN77qLJYRQmp7lEguhnMzTFY=
=GgvR
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.