aboutsummaryrefslogtreecommitdiff
path: root/rpcap-protocol.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-11-01 12:30:30 -0700
committerGuy Harris <guy@alum.mit.edu>2017-11-01 12:30:30 -0700
commit3cb41aa49d5c2dabbceccbd1239feb5eaee85c7e (patch)
treec507309aed8d75170d9864b06b8bb4ff17b35eb3 /rpcap-protocol.c
parentb4431cf7b3b949ec55dabc6df514d49bd5855c3a (diff)
Fix bounds check.
Addresses Coverity CID 1420503.
Diffstat (limited to 'rpcap-protocol.c')
-rw-r--r--rpcap-protocol.c2
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];
}