From f4f38507e54ad19ea28395f977637bb3f014c9dc Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Tue, 29 Aug 2000 08:20:59 +0000 Subject: fix for unbalanced calls to {push,pop}heap in docomplete()/get_comp_string() (12717) --- Src/Zle/zle_tricky.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Src/Zle') diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c index 63978175d..f9ba965db 100644 --- a/Src/Zle/zle_tricky.c +++ b/Src/Zle/zle_tricky.c @@ -581,7 +581,8 @@ docomplete(int lst) qisuf = ztrdup(""); zsfree(autoq); autoq = NULL; - /* Get the word to complete. */ + /* Get the word to complete. + * NOTE: get_comp_string() calls pushheap(), but not popheap(). */ noerrs = 1; s = get_comp_string(); DPUTS(wb < 0 || cs < wb || cs > we, @@ -603,6 +604,7 @@ docomplete(int lst) strcpy((char *) line, ol); ll = strlen((char *) line); cs = ocs; + popheap(); unmetafy_line(); zsfree(s); zsfree(qword); -- cgit 1.4.1