about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2004-07-17 19:24:59 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2004-07-17 19:24:59 +0000
commitf5d9a995f9aed0b6fbd566e59dae598d1eaf7b0f (patch)
treed2d18d26b9250b5073f5c7a0c3421a0a7276158c
parent0cfb07ee92ce00b01b430a09400c7740954115a4 (diff)
downloadzsh-f5d9a995f9aed0b6fbd566e59dae598d1eaf7b0f.tar.gz
zsh-f5d9a995f9aed0b6fbd566e59dae598d1eaf7b0f.tar.xz
zsh-f5d9a995f9aed0b6fbd566e59dae598d1eaf7b0f.zip
20173: fix crash when reallocating heaps
-rw-r--r--ChangeLog5
-rw-r--r--Src/mem.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index c9ec571ad..0e0e3e2e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-07-17  Peter Stephenson  <pws@pwstephenson.fsnet.co.uk>
+
+	* 20173: Src/mem.c: crash when globbing lots of files; need to
+	NULLify fheap optimisation when reallocating a heap.
+
 2004-07-13  Peter Stephenson  <pws@csr.com>
 
 	* 20153: Src/Zle/zle_main.c: make zle-line-init run after
diff --git a/Src/mem.c b/Src/mem.c
index 16537eba5..499f7d7e4 100644
--- a/Src/mem.c
+++ b/Src/mem.c
@@ -491,6 +491,7 @@ hrealloc(char *p, size_t old, size_t new)
 	     */
 	    size_t n = (new + sizeof(*h) + HEAPSIZE);
 	    n -= n % HEAPSIZE;
+	    fheap = NULL;
 
 #ifdef USE_MMAP
 	    {