Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Another crash bug in "print"
- X-seq: zsh-workers 18402
- From: Wayne Davison <wayned@xxxxxxxxxxxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Another crash bug in "print"
- Date: Fri, 28 Mar 2003 10:23:26 -0800
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <1030328173510.ZM27402@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <1030328173510.ZM27402@xxxxxxxxxxxxxxxxxxxxxxx>
On Fri, Mar 28, 2003 at 05:35:10PM +0000, Bart Schaefer wrote:
> zagzig% print -m
> zsh: segmentation fault (core dumped) Src/zsh -f
This looks like the right fix to me:
Index: Src/builtin.c
--- Src/builtin.c 17 Feb 2003 10:08:03 -0000 1.97
+++ Src/builtin.c 28 Mar 2003 18:21:25 -0000
@@ -3111,7 +3111,11 @@
if (OPT_ISSET(ops,'m')) {
Patprog pprog;
char **t, **p;
-
+
+ if (!*args) {
+ zwarnnam(name, "no pattern specified", NULL, 0);
+ return 1;
+ }
tokenize(*args);
if (!(pprog = patcompile(*args, PAT_STATIC, NULL))) {
untokenize(*args);
..wayne..
Messages sorted by:
Reverse Date,
Date,
Thread,
Author