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>
This commit is contained in:
Uli Heilmeier 2018-09-09 09:47:56 +02:00 committed by Anders Broman
parent 8d5f88db1d
commit fe0539b41f
1 changed files with 9 additions and 9 deletions

View File

@ -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--;