diff options
author | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-04-05 16:04:46 +0000 |
---|---|---|
committer | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-04-05 16:04:46 +0000 |
commit | eeb3730733accb4f0b2935fc6dd1ceba141712c1 (patch) | |
tree | 3177ac1266490b2405da0d05077cbddf9e417405 /plugins | |
parent | 08daaf87c340c936a8ac9ad8fb1fd57c4e753c7c (diff) |
From Martin Mathieson:
This patch fixes the decode problem mentioned in this bug report:
"3. Frames 9 and 13 are only partially decoded and show up as "Packet size limited during capture" It looks like the decode chokes on the DQ-RI line."
DQ-RI is a localconnectionoptions parameter and shouldn't appear as a top-level parameter. This patch makes sure that all of the single-character top-level parmeter codes are followed immediately by a ':'.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17816 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mgcp/packet-mgcp.c | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/plugins/mgcp/packet-mgcp.c b/plugins/mgcp/packet-mgcp.c index 9d478eea2e..2377ed8c74 100644 --- a/plugins/mgcp/packet-mgcp.c +++ b/plugins/mgcp/packet-mgcp.c @@ -1072,12 +1072,27 @@ static gint tvb_parse_param(tvbuff_t* tvb, gint offset, gint len, int** hf) switch (tempchar) { case 'K': + if (tvb_get_guint8(tvb,tvb_current_offset+1) != ':') + { + *hf = &hf_mgcp_param_invalid; + break; + } *hf = &hf_mgcp_param_rspack; break; case 'B': + if (tvb_get_guint8(tvb,tvb_current_offset+1) != ':') + { + *hf = &hf_mgcp_param_invalid; + break; + } *hf = &hf_mgcp_param_bearerinfo; break; case 'C': + if (tvb_get_guint8(tvb,tvb_current_offset+1) != ':') + { + *hf = &hf_mgcp_param_invalid; + break; + } *hf = &hf_mgcp_param_callid; break; case 'I': @@ -1095,6 +1110,11 @@ static gint tvb_parse_param(tvbuff_t* tvb, gint offset, gint len, int** hf) } break; case 'N': + if (tvb_get_guint8(tvb,tvb_current_offset+1) != ':') + { + *hf = &hf_mgcp_param_invalid; + break; + } *hf = &hf_mgcp_param_notifiedentity; break; case 'X': @@ -1142,6 +1162,11 @@ static gint tvb_parse_param(tvbuff_t* tvb, gint offset, gint len, int** hf) } break; case 'L': + if (tvb_get_guint8(tvb,tvb_current_offset+1) != ':') + { + *hf = &hf_mgcp_param_invalid; + break; + } *hf = &hf_mgcp_param_localconnoptions; break; case 'M': @@ -1178,14 +1203,29 @@ static gint tvb_parse_param(tvbuff_t* tvb, gint offset, gint len, int** hf) } break; case 'S': + if (tvb_get_guint8(tvb,tvb_current_offset+1) != ':') + { + *hf = &hf_mgcp_param_invalid; + break; + } *hf = &hf_mgcp_param_signalreq; buf = &(mi->signalReq); break; case 'D': + if (tvb_get_guint8(tvb,tvb_current_offset+1) != ':') + { + *hf = &hf_mgcp_param_invalid; + break; + } *hf = &hf_mgcp_param_digitmap; mi->hasDigitMap = TRUE; break; case 'O': + if (tvb_get_guint8(tvb,tvb_current_offset+1) != ':') + { + *hf = &hf_mgcp_param_invalid; + break; + } *hf = &hf_mgcp_param_observedevent; buf = &(mi->observedEvents); break; @@ -1232,15 +1272,35 @@ static gint tvb_parse_param(tvbuff_t* tvb, gint offset, gint len, int** hf) } break; case 'F': + if (tvb_get_guint8(tvb,tvb_current_offset+1) != ':') + { + *hf = &hf_mgcp_param_invalid; + break; + } *hf = &hf_mgcp_param_reqinfo; break; case 'Q': + if (tvb_get_guint8(tvb,tvb_current_offset+1) != ':') + { + *hf = &hf_mgcp_param_invalid; + break; + } *hf = &hf_mgcp_param_quarantinehandling; break; case 'T': + if (tvb_get_guint8(tvb,tvb_current_offset+1) != ':') + { + *hf = &hf_mgcp_param_invalid; + break; + } *hf = &hf_mgcp_param_detectedevents; break; case 'A': + if (tvb_get_guint8(tvb,tvb_current_offset+1) != ':') + { + *hf = &hf_mgcp_param_invalid; + break; + } *hf = &hf_mgcp_param_capabilities; break; |