aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-07-04 20:00:33 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-07-04 20:00:33 +0200
commit8cbd9f4d09fc906f744f09899acb097ebb75fb83 (patch)
treefe65717da56ee376f145db2aaa8932a635dc1ec7
parenta677cbc0cbeaf6c4f7b29943793ab8dd76227a7c (diff)
e1_input_vty: Help coverity in understanding this code
In theory argc could be negative and this code would crash with a null pointer dereference on the line pointer. Check for <= to avoid this warning. Fixes: Coverity CID 1040699
-rw-r--r--src/e1_input_vty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/e1_input_vty.c b/src/e1_input_vty.c
index efe2bca6..b6e14381 100644
--- a/src/e1_input_vty.c
+++ b/src/e1_input_vty.c
@@ -221,7 +221,7 @@ DEFUN(show_e1ts,
struct e1inp_ts *ts;
int ts_nr;
- if (argc == 0) {
+ if (argc <= 0) {
llist_for_each_entry(line, &e1inp_line_list, list) {
for (ts_nr = 0; ts_nr < line->num_ts; ts_nr++) {
ts = &line->ts[ts_nr];