mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-02 08:42:48 +00:00
Set the program name before trying to use it.
Found by: Aage Robekk <aagero@aage.priv.no>
This commit is contained in:
parent
9b2b0822b7
commit
2a7a2545a4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=16472
@ -16,7 +16,7 @@
|
||||
*
|
||||
* NEW command line interface for IP firewall facility
|
||||
*
|
||||
* $Id: ipfw.c,v 1.24 1996/05/11 20:31:55 phk Exp $
|
||||
* $Id: ipfw.c,v 1.25 1996/06/09 23:46:22 alex Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -833,6 +833,8 @@ main(ac, av)
|
||||
int i;
|
||||
FILE *f;
|
||||
|
||||
strcpy(progname,*av);
|
||||
|
||||
s = socket( AF_INET, SOCK_RAW, IPPROTO_RAW );
|
||||
if ( s < 0 ) {
|
||||
fprintf(stderr,"%s: Can't open raw socket.\n"
|
||||
@ -842,8 +844,6 @@ main(ac, av)
|
||||
|
||||
setbuf(stdout,0);
|
||||
|
||||
strcpy(progname,*av);
|
||||
|
||||
if (av[1] && !access(av[1], R_OK)) {
|
||||
lineno = 0;
|
||||
f = fopen(av[1], "r");
|
||||
|
Loading…
Reference in New Issue
Block a user