[145] in Zephyr_Bugs
patch to fix zctl segfault
daemon@ATHENA.MIT.EDU (Jonathan I. Kamens)
Mon Nov 12 13:22:04 1990
Date: Mon, 12 Nov 90 13:21:44 -0500
From: "Jonathan I. Kamens" <jik@pit-manager.MIT.EDU>
To: bug-zephyr@ATHENA.MIT.EDU
dschmidt reported:
~ % zctl set zwrite-signature SWM, 21, 5\'11\", 145
zctl: Unbalanced quotes in command line
Segmentation violation
This patch to the ss library fixes it:
*** /tmp/,RCSt1010504 Mon Nov 12 13:21:24 1990
--- parse.c Tue Feb 13 18:45:49 1990
***************
*** 47,52 ****
--- 47,53 ----
argv = (char **) malloc (sizeof(char *));
if (argv == (char **)NULL) {
ss_error(sci_idx, errno, "Can't allocate storage");
+ *argc_ptr = 0;
return(argv);
}
*argv = (char *)NULL;
***************
*** 108,113 ****
--- 109,115 ----
ss_error (sci_idx, 0,
"Unbalanced quotes in command line");
free (argv);
+ *argc_ptr = 0;
return NULL;
}
else if (*line_ptr == '"') {