diff options
author | Michael Mann <mmann78@netscape.net> | 2017-01-29 14:19:25 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-01-30 00:05:39 +0000 |
commit | c44c8f9e6c7b633eae3129c58aab991ddc8678ed (patch) | |
tree | 7c862670618cfaf30f1efcbb5aa2bbc461e1bc04 /epan/dissectors/packet-mq.c | |
parent | b3035df88796e0e9058b315791861b03b3b59af7 (diff) |
Have format_text_chr use wmem allocated memory.
Change-Id: Idcea59f6fc84238f04d9ffc11a0088ef97beec0c
Reviewed-on: https://code.wireshark.org/review/19844
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-mq.c')
-rw-r--r-- | epan/dissectors/packet-mq.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-mq.c b/epan/dissectors/packet-mq.c index 06ac0a3bf3..b4a841bc48 100644 --- a/epan/dissectors/packet-mq.c +++ b/epan/dissectors/packet-mq.c @@ -2844,12 +2844,12 @@ static void dissect_mq_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } iApp = tvb_get_guint32(tvb, offset + 48 + 28, iCod); - sApplicationName = format_text_chr(tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 48, 28, iEnc), 28, '.'); + sApplicationName = format_text_chr(wmem_packet_scope(), tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 48, 28, iEnc), 28, '.'); if (strip_trailing_blanks((guint8 *)sApplicationName, 28) > 0) { col_append_fstr(pinfo->cinfo, COL_INFO, " App=%s", sApplicationName); } - sQMgr = format_text_chr(tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 48, iEnc), 48, '.'); + sQMgr = format_text_chr(wmem_packet_scope(), tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 48, iEnc), 48, '.'); if (strip_trailing_blanks((guint8 *)sQMgr, 48) > 0) { col_append_fstr(pinfo->cinfo, COL_INFO, " QM=%s", sQMgr); @@ -3740,7 +3740,7 @@ static void dissect_mq_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (*sStr) strip_trailing_blanks(sStr, iLenStr); if (*sStr) - format_text_chr(sStr, strlen((const char *)sStr), '.'); + sStr = (guint8*)format_text_chr(wmem_packet_scope(), sStr, strlen((const char *)sStr), '.'); rfh_tree = proto_tree_add_subtree_format(mq_tree, tvb, iPos, iLenStr+4, ett_mq_rfh_ValueName, NULL, "NameValue: %s", sStr); |