aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-12-24 12:24:03 +0100
committerHarald Welte <laforge@gnumonks.org>2010-12-24 12:24:03 +0100
commit712ddbcd72af2f06ba6d1ef6208e59e5de04ee65 (patch)
treee81f201ff2631c4b0c39c36c57b64fe3c4641a02 /openbsc
parent85bded8b50cd90379ccc9fd44c9f6f9471348873 (diff)
BSC VTY: Fix off-by-one / segfault in 'show bts NR'
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/bsc_vty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/bsc_vty.c b/openbsc/src/bsc_vty.c
index 5474b910d..0c16164d6 100644
--- a/openbsc/src/bsc_vty.c
+++ b/openbsc/src/bsc_vty.c
@@ -269,7 +269,7 @@ DEFUN(show_bts, show_bts_cmd, "show bts [number]",
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;