diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2014-11-10 08:27:15 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-03-27 22:33:39 +0100 |
commit | bdbb54b31379d61529bf351ca8de134d85654d61 (patch) | |
tree | 2241b67891d84d1f5110db0ade61dc3752d5de4f | |
parent | fabe7d51bef1b4d3e8ec6d74de5d6143d27fcce0 (diff) |
bssgp: Fix VTY command 'show bssgp nsei N'
Currently this command segfaults (at least when ASAN is enabled),
because when getting the NSEI the index to argv is wrong and out of
bounds.
This patch fixes the offset.
Sponsored-by: On-Waves ehf
-rw-r--r-- | src/gb/gprs_bssgp_vty.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gb/gprs_bssgp_vty.c b/src/gb/gprs_bssgp_vty.c index d8e1d32f..be90e3b7 100644 --- a/src/gb/gprs_bssgp_vty.c +++ b/src/gb/gprs_bssgp_vty.c @@ -135,7 +135,7 @@ DEFUN(show_bvc, show_bvc_cmd, "show bssgp nsei <0-65535> [stats]", "The NSEI\n" "Include Statistics\n") { struct bssgp_bvc_ctx *bvc; - uint16_t nsei = atoi(argv[1]); + uint16_t nsei = atoi(argv[0]); int show_stats = 0; if (argc >= 2) |