mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-25 05:10:28 +02:00
Mapfile fix from Bart: dupstring parameter name to avoid static buffer overuse
This commit is contained in:
parent
fcbd51acb1
commit
ca3f1a3b79
2 changed files with 6 additions and 0 deletions
|
|
@ -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>
|
2001-04-10 Wayne Davison <wayned@users.sourceforge.net>
|
||||||
|
|
||||||
* unposted: Src/hist.c: Slightly enhanced should_ignore_line()
|
* unposted: Src/hist.c: Slightly enhanced should_ignore_line()
|
||||||
|
|
|
||||||
|
|
@ -318,6 +318,7 @@ scanpmmapfile(HashTable ht, ScanFunc func, int flags)
|
||||||
* we always read the entire contents of every single file
|
* we always read the entire contents of every single file
|
||||||
* in the directory into memory. Hence just leave it empty.
|
* in the directory into memory. Hence just leave it empty.
|
||||||
*/
|
*/
|
||||||
|
pm.nam = dupstring(pm.nam);
|
||||||
pm.u.str = "";
|
pm.u.str = "";
|
||||||
func((HashNode) &pm, flags);
|
func((HashNode) &pm, flags);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue