diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2008-11-27 16:41:44 +0000 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2008-11-27 16:41:44 +0000 |
commit | 130a59e567ad889d7fc3e9ed8a5ce8734495d525 (patch) | |
tree | 739480366da979cc902f2fa5f3ef090c4c1715cf /epan/dissectors/packet-rpcap.c | |
parent | 078e09692aca65348565b9d28ddec8a25c5319fe (diff) |
Improved the msg_type and msg_value heur checks.
svn path=/trunk/; revision=26865
Diffstat (limited to 'epan/dissectors/packet-rpcap.c')
-rwxr-xr-x | epan/dissectors/packet-rpcap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/epan/dissectors/packet-rpcap.c b/epan/dissectors/packet-rpcap.c index d77ae72620..c32bc47fe0 100755 --- a/epan/dissectors/packet-rpcap.c +++ b/epan/dissectors/packet-rpcap.c @@ -925,13 +925,16 @@ check_rpcap_heur (tvbuff_t *tvb, gboolean tcp) /* UDP is only used for packets */ return FALSE; } + if (match_strval(msg_type, message_type) == NULL) + /* Unknown message type */ + return FALSE; offset++; msg_value = tvb_get_ntohs (tvb, offset); if (msg_value > 0) { if (msg_type == RPCAP_MSG_ERROR) { /* Must have a valid error code */ - if (msg_value < RPCAP_ERR_NETW || msg_value > RPCAP_ERR_WRONGVER) + if (match_strval(msg_value, error_codes) == NULL) return FALSE; } else if (msg_type != RPCAP_MSG_FINDALLIF_REPLY) { return FALSE; |