From 712ddbcd72af2f06ba6d1ef6208e59e5de04ee65 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 24 Dec 2010 12:24:03 +0100 Subject: [PATCH] BSC VTY: Fix off-by-one / segfault in 'show bts NR' --- openbsc/src/bsc_vty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;