diff --git a/sys/shell/commands/sc_ipv6_nc.c b/sys/shell/commands/sc_ipv6_nc.c index a4dcc166d..ae4d9cac2 100644 --- a/sys/shell/commands/sc_ipv6_nc.c +++ b/sys/shell/commands/sc_ipv6_nc.c @@ -237,10 +237,10 @@ int _ipv6_nc_manage(int argc, char **argv) } if (argc > 1) { - if (strcmp("add", argv[1]) == 0) { + if ((argc > 2) && (strcmp("add", argv[1]) == 0)) { return _ipv6_nc_add(argc - 2, &argv[2]); } - if (strcmp("del", argv[1]) == 0) { + if ((argc > 2) && (strcmp("del", argv[1]) == 0)) { return _ipv6_nc_del(argv[2]); } if (strcmp("reset", argv[1]) == 0) {