Date: Sat, 12 Oct 2002 19:15:10 -0700 From: Juli Mallett <jmallett@FreeBSD.org> To: Terry Lambert <tlambert2@mindspring.com> Cc: Kris Kennaway <kris@obsecurity.org>, current@FreeBSD.org, alfred@FreeBSD.org Subject: Re: rpcgen dumping core Message-ID: <20021012191510.A39512@FreeBSD.org> In-Reply-To: <3DA8D1BA.D440D106@mindspring.com>; from tlambert2@mindspring.com on Sat, Oct 12, 2002 at 06:51:54PM -0700 References: <20021012225839.GA96586@xor.obsecurity.org> <3DA8D1BA.D440D106@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
* De: Terry Lambert <tlambert2@mindspring.com> [ Data: 2002-10-12 ] [ Subjecte: Re: rpcgen dumping core ] > Kris Kennaway wrote: > > rpcgen -s `perl -e 'print "a"x5120'` > > rpcgen -n `perl -e 'print "a"x5120'` > > > > will both segfault when you ^D them. > > > The fix works by substituting "" for NULL before this happens, > but *after* the output file names have been created, to avoid > creating files with a bogus prefix name. > > Index: rpc_svcout.c > =================================================================== > RCS file: /cvs/src/usr.bin/rpcgen/rpc_svcout.c,v > retrieving revision 1.14 > diff -c -r1.14 rpc_svcout.c > *** rpc_svcout.c 21 Jul 2002 12:55:04 -0000 1.14 > --- rpc_svcout.c 12 Oct 2002 21:47:39 -0000 > *************** > *** 107,112 **** > --- 107,115 ---- > int netflag; > int nomain; > { > + if (!infile) > + infile = ""; > + > if (inetdflag || pmflag) { > char* var_type; > var_type = (nomain? "extern" : "static"); Personally, I'd rather see it be: if (infile == NULL) infile = "-"; As that's how we tend to represent stdin, yes? -- Juli Mallett <jmallett@FreeBSD.org> | FreeBSD: The Power To Serve Will break world for fulltime employment. | finger jmallett@FreeBSD.org http://people.FreeBSD.org/~jmallett/ | Support my FreeBSD hacking! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021012191510.A39512>