aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2006-04-05 16:04:46 +0000
committerAnders Broman <anders.broman@ericsson.com>2006-04-05 16:04:46 +0000
commita12aba1d398c3e7fe05fc068a6dd233c3ab30310 (patch)
tree3177ac1266490b2405da0d05077cbddf9e417405 /plugins
parentba35e5d4d96f74408e8b4cde611ddda4e22db2b2 (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 ':'. svn path=/trunk/; revision=17816
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mgcp/packet-mgcp.c60
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;