Subject: Re: NetBSD - Nov 20: Seg Fault in sed(1)
To: Simon J. Gerraty <sjg@zen.void.oz.au>
From: Keith White <kwhite@csi.UOttawa.CA>
List: current-users
Date: 12/01/1993 09:48:24
Simon J. Gerraty said:
> Since updating to Nov 20 NetBSD, sed(1) gets a segmentation fault when
> running /usr/share/man/makewhatis.sed
> ...
> Anyone found and fixed the problem?
I had the same problem. Here's my fix:
---cut here---
*** compile.c.orig Sun Nov 7 05:09:19 1993
--- compile.c Wed Dec 1 09:40:37 1993
***************
*** 208,213 ****
--- 208,214 ----
if (!*p)
p = NULL;
cmd2 = xmalloc(sizeof(struct s_command));
+ memset(cmd2, 0, sizeof(*cmd2));
cmd2->code = '}';
*compile_stream("}", &cmd->u.c, p) = cmd2;
cmd->next = cmd2;
---cut here---
...keith
--
Keith White, Department of Computer Science, University of Ottawa
kwhite@csi.uottawa.ca [+1 613 564 5455]
------------------------------------------------------------------------------