diff options
author | Guy Harris <guy@alum.mit.edu> | 2017-11-01 12:30:30 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2017-11-01 12:30:30 -0700 |
commit | 3cb41aa49d5c2dabbceccbd1239feb5eaee85c7e (patch) | |
tree | c507309aed8d75170d9864b06b8bb4ff17b35eb3 /rpcap-protocol.c | |
parent | b4431cf7b3b949ec55dabc6df514d49bd5855c3a (diff) |
Fix bounds check.
Addresses Coverity CID 1420503.
Diffstat (limited to 'rpcap-protocol.c')
-rw-r--r-- | rpcap-protocol.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rpcap-protocol.c b/rpcap-protocol.c index a7375f47..39658aa6 100644 --- a/rpcap-protocol.c +++ b/rpcap-protocol.c @@ -188,7 +188,7 @@ rpcap_msg_type_string(uint8 type) return NULL; return replies[type]; } else { - if (type > NUM_REQ_TYPES) + if (type >= NUM_REQ_TYPES) return NULL; return requests[type]; } |