diff options
author | Uli Heilmeier <uh@heilmeier.eu> | 2018-09-09 09:47:56 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-09-11 04:11:56 +0000 |
commit | fe0539b41f533d78a5206b79b4f7f6c78dd0ed5e (patch) | |
tree | e0fb5c4d10ac8820213d9c1576f532e8168c02dd /epan/dissectors/packet-mgcp.c | |
parent | 8d5f88db1dfc7003ad2cd82587e924df5ce91041 (diff) |
MGCP: Ignore case for command header
Bug: 15008
Change-Id: Ibfd9bd8d9d93ddac8c5441be9f5e27c3e095c11b
Reviewed-on: https://code.wireshark.org/review/29502
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-mgcp.c')
-rw-r--r-- | epan/dissectors/packet-mgcp.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/epan/dissectors/packet-mgcp.c b/epan/dissectors/packet-mgcp.c index 9e6a70a36b..cf5e763faf 100644 --- a/epan/dissectors/packet-mgcp.c +++ b/epan/dissectors/packet-mgcp.c @@ -807,7 +807,7 @@ static gint tvb_parse_param(tvbuff_t* tvb, gint offset, gint len, int** hf, mgcp if (len > 0) { - tempchar = tvb_get_guint8(tvb, tvb_current_offset); + tempchar = (guint8)g_ascii_toupper(tvb_get_guint8(tvb, tvb_current_offset)); switch (tempchar) { @@ -871,18 +871,18 @@ static gint tvb_parse_param(tvbuff_t* tvb, gint offset, gint len, int** hf, mgcp /* XRM/MCR */ else if (len > (tvb_current_offset - offset) && - (tempchar = tvb_get_guint8(tvb,tvb_current_offset)) == 'R') + (tempchar = (guint8)g_ascii_toupper(tvb_get_guint8(tvb,tvb_current_offset))) == 'R') { /* Move past 'R' */ tvb_current_offset += 3; if (len > (tvb_current_offset - offset) && - (tempchar = tvb_get_guint8(tvb,tvb_current_offset)) == 'R') + (tempchar = (guint8)g_ascii_toupper(tvb_get_guint8(tvb,tvb_current_offset))) == 'R') { *hf = &hf_mgcp_param_remotevoicemetrics; } else if (len > (tvb_current_offset - offset) && - (tempchar = tvb_get_guint8(tvb,tvb_current_offset)) == 'L') + (tempchar = (guint8)g_ascii_toupper(tvb_get_guint8(tvb,tvb_current_offset))) == 'L') { *hf = &hf_mgcp_param_localvoicemetrics; } @@ -932,7 +932,7 @@ static gint tvb_parse_param(tvbuff_t* tvb, gint offset, gint len, int** hf, mgcp case 'M': tvb_current_offset++; if (len > (tvb_current_offset - offset) && - (tempchar = tvb_get_guint8(tvb, tvb_current_offset)) == ':') + (tempchar = (guint8)g_ascii_toupper(tvb_get_guint8(tvb, tvb_current_offset))) == ':') { *hf = &hf_mgcp_param_connectionmode; tvb_current_offset--; @@ -946,7 +946,7 @@ static gint tvb_parse_param(tvbuff_t* tvb, gint offset, gint len, int** hf, mgcp case 'R': tvb_current_offset++; if (len > (tvb_current_offset - offset) && - (tempchar = tvb_get_guint8(tvb, tvb_current_offset)) == ':') + (tempchar = (guint8)g_ascii_toupper(tvb_get_guint8(tvb, tvb_current_offset))) == ':') { *hf = &hf_mgcp_param_reqevents; tvb_current_offset--; @@ -992,7 +992,7 @@ static gint tvb_parse_param(tvbuff_t* tvb, gint offset, gint len, int** hf, mgcp case 'P': tvb_current_offset++; if (len > (tvb_current_offset - offset) && - (tempchar = tvb_get_guint8(tvb, tvb_current_offset)) == ':') + (tempchar = (guint8)g_ascii_toupper(tvb_get_guint8(tvb, tvb_current_offset))) == ':') { *hf = &hf_mgcp_param_connectionparam; tvb_current_offset--; @@ -1006,7 +1006,7 @@ static gint tvb_parse_param(tvbuff_t* tvb, gint offset, gint len, int** hf, mgcp case 'E': tvb_current_offset++; if (len > (tvb_current_offset - offset) && - (tempchar = tvb_get_guint8(tvb, tvb_current_offset)) == ':') + (tempchar = (guint8)g_ascii_toupper(tvb_get_guint8(tvb, tvb_current_offset))) == ':') { *hf = &hf_mgcp_param_reasoncode; tvb_current_offset--; @@ -1020,7 +1020,7 @@ static gint tvb_parse_param(tvbuff_t* tvb, gint offset, gint len, int** hf, mgcp case 'Z': tvb_current_offset++; if (len > (tvb_current_offset - offset) && - (tempchar = tvb_get_guint8(tvb, tvb_current_offset)) == ':') + (tempchar = (guint8)g_ascii_toupper(tvb_get_guint8(tvb, tvb_current_offset))) == ':') { *hf = &hf_mgcp_param_specificendpoint; tvb_current_offset--; |