* PATCH: Re: zparseopts causes core dump
@ 2000-05-15 8:02 Sven Wischnowsky
0 siblings, 0 replies; only message in thread
From: Sven Wischnowsky @ 2000-05-15 8:02 UTC (permalink / raw)
To: zsh-workers
Tanaka Akira wrote:
> zparseopts causes core dump as follows.
>
> Z(4):akr@serein% Src/zsh -f
> serein% set - -a
> serein% zparseopts -a=xxx
> zsh: segmentation fault (core dumped) Src/zsh -f
`-a=xxx' is not a option description and zparseopts should catch that
case, right.
Bye
Sven
Index: Src/Modules/zutil.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/zutil.c,v
retrieving revision 1.2
diff -u -r1.2 zutil.c
--- Src/Modules/zutil.c 2000/05/04 20:16:10 1.2
+++ Src/Modules/zutil.c 2000/05/15 08:00:59
@@ -1326,12 +1326,18 @@
}
break;
}
- if (!o)
+ if (!o) {
+ o = "";
break;
+ }
} else {
args--;
break;
}
+ }
+ if (!o) {
+ zwarnnam(nam, "missing option descriptions", NULL, 0);
+ return 1;
}
while ((o = dupstring(*args++))) {
if (!*o) {
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-05-15 8:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-15 8:02 PATCH: Re: zparseopts causes core dump Sven Wischnowsky
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).