about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2001-04-11 00:09:05 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2001-04-11 00:09:05 +0000
commitca3f1a3b79eb873ff01eb55959799487f6cc9936 (patch)
tree2637c6f37e2e4af789b901b279f0b43f547c0b3e
parentfcbd51acb1719be3ddc8c190bd688520c25cfb50 (diff)
downloadzsh-ca3f1a3b79eb873ff01eb55959799487f6cc9936.tar.gz
zsh-ca3f1a3b79eb873ff01eb55959799487f6cc9936.tar.xz
zsh-ca3f1a3b79eb873ff01eb55959799487f6cc9936.zip
Mapfile fix from Bart: dupstring parameter name to avoid static buffer overuse
-rw-r--r--ChangeLog5
-rw-r--r--Src/Modules/mapfile.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 2fef5edb8..82ba670ee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-04-11  Peter Stephenson  <pws@pwstephenson.fsnet.co.uk>
+
+	* 13944: Src/Modules/mapfile.c (from Bart): dupstring the
+	parameter name to avoid static buffer re-use problem.
+
 2001-04-10  Wayne Davison  <wayned@users.sourceforge.net>
 
 	* unposted: Src/hist.c: Slightly enhanced should_ignore_line()
diff --git a/Src/Modules/mapfile.c b/Src/Modules/mapfile.c
index bed98da2b..586e4a24e 100644
--- a/Src/Modules/mapfile.c
+++ b/Src/Modules/mapfile.c
@@ -318,6 +318,7 @@ scanpmmapfile(HashTable ht, ScanFunc func, int flags)
 	 * we always read the entire contents of every single file
 	 * in the directory into memory.  Hence just leave it empty.
 	 */
+	pm.nam = dupstring(pm.nam);
 	pm.u.str = "";
 	func((HashNode) &pm, flags);
     }