diff options
author | F. Aragon <paco@voltanet.io> | 2018-07-02 16:30:40 +0200 |
---|---|---|
committer | F. Aragon <paco@voltanet.io> | 2018-07-03 11:34:40 +0200 |
commit | e1fa928d2216ef227f3280f9f7d1b661d04ccd33 (patch) | |
tree | 34d7b6ab7c9c66625f468b92d83abf6b4a726aa5 /zebra/redistribute.c | |
parent | Merge pull request #2475 from LabNConsulting/working/master/no_vrf_socket_4l3... (diff) | |
download | frr-e1fa928d2216ef227f3280f9f7d1b661d04ccd33.tar.xz frr-e1fa928d2216ef227f3280f9f7d1b661d04ccd33.zip |
ospfd zebra: array overrun fixes (PVS-Studio)
Signed-off-by: F. Aragon <paco@voltanet.io>
Diffstat (limited to 'zebra/redistribute.c')
-rw-r--r-- | zebra/redistribute.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zebra/redistribute.c b/zebra/redistribute.c index be53b74b3..1fee675cb 100644 --- a/zebra/redistribute.c +++ b/zebra/redistribute.c @@ -274,7 +274,7 @@ void zebra_redistribute_add(ZAPI_HANDLER_ARGS) __func__, zebra_route_string(client->proto), afi, zebra_route_string(type), zvrf_id(zvrf), instance); - if (afi == 0 || afi > AFI_MAX) { + if (afi == 0 || afi >= AFI_MAX) { zlog_warn("%s: Specified afi %d does not exist", __PRETTY_FUNCTION__, afi); return; @@ -320,7 +320,7 @@ void zebra_redistribute_delete(ZAPI_HANDLER_ARGS) STREAM_GETC(msg, type); STREAM_GETW(msg, instance); - if (afi == 0 || afi > AFI_MAX) { + if (afi == 0 || afi >= AFI_MAX) { zlog_warn("%s: Specified afi %d does not exist", __PRETTY_FUNCTION__, afi); return; |