* PATCH: Fix core dump in "hash"
@ 2002-01-11 15:29 Bart Schaefer
0 siblings, 0 replies; only message in thread
From: Bart Schaefer @ 2002-01-11 15:29 UTC (permalink / raw)
To: zsh-workers
zsh% hash -d \=/any/path
zsh: bad assignment
Segmentation fault
Somebody got a little carried away with code compactness, long, long ago.
Index: Src/builtin.c
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-4.0/Src/builtin.c,v
retrieving revision 1.11
diff -c -r1.11 builtin.c
--- Src/builtin.c 2002/01/07 15:18:22 1.11
+++ Src/builtin.c 2002/01/11 15:25:06
@@ -2659,7 +2659,7 @@
zwarnnam(name, "bad pattern : %s", *argv, 0);
returnval = 1;
}
- } else if((asg = getasg(*argv))->value) {
+ } else if ((asg = getasg(*argv)) && asg->value) {
if(isset(RESTRICTED)) {
zwarnnam(name, "restricted: %s", asg->value, 0);
returnval = 1;
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-01-11 15:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-11 15:29 PATCH: Fix core dump in "hash" Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).