commit | 712ddbcd72af2f06ba6d1ef6208e59e5de04ee65 | [log] [tgz] |
---|---|---|
author | Harald Welte <laforge@gnumonks.org> | Fri Dec 24 12:24:03 2010 +0100 |
committer | Harald Welte <laforge@gnumonks.org> | Fri Dec 24 12:24:03 2010 +0100 |
tree | e81f201ff2631c4b0c39c36c57b64fe3c4641a02 | |
parent | 85bded8b50cd90379ccc9fd44c9f6f9471348873 [diff] |
BSC VTY: Fix off-by-one / segfault in 'show bts NR'
diff --git a/openbsc/src/bsc_vty.c b/openbsc/src/bsc_vty.c index 5474b91..0c16164 100644 --- a/openbsc/src/bsc_vty.c +++ b/openbsc/src/bsc_vty.c
@@ -269,7 +269,7 @@ if (argc != 0) { /* use the BTS number that the user has specified */ bts_nr = atoi(argv[0]); - if (bts_nr > net->num_bts) { + if (bts_nr >= net->num_bts) { vty_out(vty, "%% can't find BTS '%s'%s", argv[0], VTY_NEWLINE); return CMD_WARNING;