Re: [PATCH] convert_var_to_array: handle non-scalar source var

Chet Ramey <[email protected]> Thu, 4 Jun 2026 14:14:30 -0400
Newsgroups gmane.comp.shells.bash.bugs
Organization ITS, Case Western Reserve University
Message-ID <[email protected]>
On 6/3/26 7:17 PM, Grisha Levit wrote:
> convert_var_to_{array,assoc} can get called with a non-scalar VAR
> argument, in which case the old variable's hash pointer is assigned to
> element 0 of the new array, and its storage never gets freed properly.

Thanks for the report and patch.

Chet

-- 
``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-----

wmMEABEIACMWIQR8ATX7CIqvbGbGULm7WGnwZOp0qwUCaiHAhgUDAAAAAAAKCRC7WGnwZOp0qyV3
AKCGZTUg8Ot5PXFUlKMIULJwImyuCACcD60djFsnXFnG/4tCerS8TYdgJO0=
=EExk
-----END PGP SIGNATURE-----