From dfb24f53ecfde8b69c899e48207c03f599d84cec Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Wed, 28 Nov 2001 18:30:51 +0000 Subject: 16269: Fix crash on reserved-word completion. --- ChangeLog | 4 ++++ Src/Zle/compctl.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 68a3dcb9e..350e8b085 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ 2001-11-21 Bart Schaefer + * 16269: Src/Zle/compctl.c: Use allocated strings when adding + matches for hash table entries, as the pattern match code may + attempt to modify them. (Fixes crash reported in 16235.) + * Sven: 16249: Src/parse.c: Clear pending here-documents upon a parse error. diff --git a/Src/Zle/compctl.c b/Src/Zle/compctl.c index 56de52e46..b4981a842 100644 --- a/Src/Zle/compctl.c +++ b/Src/Zle/compctl.c @@ -2096,7 +2096,7 @@ dumphashtable(HashTable ht, int what) for (i = 0; i < ht->hsize; i++) for (hn = ht->nodes[i]; hn; hn = hn->next) - addmatch(hn->nam, (char *) hn); + addmatch(dupstring(hn->nam), (char *) hn); } /* ScanFunc used by maketildelist() et al. */ -- cgit 1.4.1