Date: Tue, 21 Dec 1999 03:50:02 -0800 (PST) From: Sheldon Hearn <sheldonh@uunet.co.za> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/15471: fsplit buffer overflow fixes Message-ID: <199912211150.DAA44813@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/15471; it has been noted by GNATS. From: Sheldon Hearn <sheldonh@uunet.co.za> To: "Steven G. Kargl" <kargl@troutmask.apl.washington.edu> Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: bin/15471: fsplit buffer overflow fixes Date: Tue, 21 Dec 1999 13:42:51 +0200 On Tue, 14 Dec 1999 11:06:41 PST, "Steven G. Kargl" wrote: > + extern int optind; > + extern char *optarg; > + I think these are declared in unistd.h, which you should always include for getopt(3). > + extrfnd = (int *) malloc(argc * sizeof(int)); > + if (extrfnd == NULL) > + errx(1, NULL); The style(9) way of doing this seems to be to put the malloc, assignment and evaluation in the if condition. The same applies to your fopen() later. If I were to commit with these minor deviations from your patch, would you be happy? Ciao, Sheldon. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912211150.DAA44813>