[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: unset associative array may cause segfault
From: |
Chet Ramey |
Subject: |
Re: unset associative array may cause segfault |
Date: |
Tue, 25 Aug 2009 10:47:44 -0400 |
User-agent: |
Thunderbird 2.0.0.23 (Macintosh/20090812) |
Roman Rakus wrote:
> reproducer:
> declare -A aaa
> aaa='somestring'
> unset aaa
>
> This commands cause segmentation fault, free unallocated memory.
> Chet do you already fix it? Here is my fast patch.
I already fixed it, thanks. Your patch introduces large memory leaks;
the right place to fix it is where the code passes a literal string to
assoc_insert().
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/