summaryrefslogtreecommitdiff
path: root/zebra/zapi_msg.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zapi_msg.c')
-rw-r--r--zebra/zapi_msg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c
index b17bbc95c2..853a83373d 100644
--- a/zebra/zapi_msg.c
+++ b/zebra/zapi_msg.c
@@ -3061,7 +3061,7 @@ void zserv_handle_commands(struct zserv *client, struct stream *msg)
return;
}
- if (hdr.command > array_size(zserv_handlers)
+ if (hdr.command >= array_size(zserv_handlers)
|| zserv_handlers[hdr.command] == NULL)
zlog_info("Zebra received unknown command %d", hdr.command);
else