diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2018-02-04 17:31:23 +0100 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2018-02-04 18:51:13 +0000 |
commit | d447467eb5a7b609d1594d9efacbd91e4ffad50d (patch) | |
tree | 4597851f19243ab55ef822cde31baa8a87fbc346 /epan/dissectors | |
parent | 551f6bdd8c2fe9ab5655f403c92667d759276a70 (diff) |
MQ: use real string length when calling strip_trailing_blanks()
Bug: 14390
Change-Id: I5acfc651237da55c3ee907f21d89a3add6edeeef
Reviewed-on: https://code.wireshark.org/review/25596
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-mq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-mq.c b/epan/dissectors/packet-mq.c index e368c7de50..4b4112e4b4 100644 --- a/epan/dissectors/packet-mq.c +++ b/epan/dissectors/packet-mq.c @@ -2491,13 +2491,13 @@ static void dissect_mq_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) sApplicationName = tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 48, 28, iEnc); sApplicationName = format_text_chr(wmem_packet_scope(), sApplicationName, strlen(sApplicationName), '.'); - if (strip_trailing_blanks((guint8 *)sApplicationName, 28) > 0) + if (strip_trailing_blanks((guint8 *)sApplicationName, (guint32)strlen(sApplicationName)) > 0) { col_append_fstr(pinfo->cinfo, COL_INFO, " App=%s", sApplicationName); } sQMgr = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 48, iEnc); sQMgr = format_text_chr(wmem_packet_scope(), sQMgr, strlen(sQMgr), '.'); - if (strip_trailing_blanks((guint8 *)sQMgr, 48) > 0) + if (strip_trailing_blanks((guint8 *)sQMgr, (guint32)strlen(sQMgr)) > 0) { col_append_fstr(pinfo->cinfo, COL_INFO, " QM=%s", sQMgr); } |