From f22e348287409d2ec63b0f21e2baa88a248be678 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 5 Apr 2011 18:33:17 +0200 Subject: ipaccess-config: exit if no network interface is specified ipaccess-config has to exit if no network interface is specified, otherwise it uses argv[1] which has a uninitialized value. --- openbsc/src/ipaccess/ipaccess-find.c | 1 + 1 file changed, 1 insertion(+) (limited to 'openbsc/src/ipaccess') diff --git a/openbsc/src/ipaccess/ipaccess-find.c b/openbsc/src/ipaccess/ipaccess-find.c index 6dc2f0641..a27360937 100644 --- a/openbsc/src/ipaccess/ipaccess-find.c +++ b/openbsc/src/ipaccess/ipaccess-find.c @@ -196,6 +196,7 @@ int main(int argc, char **argv) if (argc < 2) { fprintf(stdout, "you might need to specify the outgoing\n" " network interface, e.g. ``%s eth0''\n", argv[0]); + exit(EXIT_FAILURE); } ifname = argv[1]; -- cgit v1.2.3