aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHadriel Kaplan <hadrielk@yahoo.com>2014-03-22 10:27:33 -0400
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2014-03-22 14:48:51 +0000
commit1f28f472c85f51cc7925f18bca285ccfe0d4e5f6 (patch)
treea2e2b65d7beafb25ba6b54d3f65a163a94bb5944
parent4acdfe3e63ee9af54cc766a6698c81283f46685c (diff)
Fix Bug 9915 'GIOP dissector prints non-UTF-8 to Info column'
When the capture file in Bug 9915 is opened in wireshark with GTK2, the console prints out 'Pango-WARNING **: Invalid UTF-8' warnings. This capture file was a subset of the one in fuzzbot crash bug 9883. I believe it is what's causing the crash in 9883, because GTK is finicky about such things. But my system doesn't crash for bug 9883, so perhaps it's not the same root cause. Change-Id: Ifaaed9157f9abd34014001c954647f7db51d650b Reviewed-on: https://code.wireshark.org/review/786 Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
-rw-r--r--epan/dissectors/packet-giop.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/epan/dissectors/packet-giop.c b/epan/dissectors/packet-giop.c
index c6e22ec63a..a6dfabd9b9 100644
--- a/epan/dissectors/packet-giop.c
+++ b/epan/dissectors/packet-giop.c
@@ -291,6 +291,7 @@
#include <epan/wmem/wmem.h>
#include <epan/prefs.h>
#include <epan/expert.h>
+#include <epan/strutil.h>
#include "packet-giop.h"
#include "packet-ziop.h"
@@ -3321,6 +3322,8 @@ guint32 get_CDR_string(tvbuff_t *tvb, const gchar **seq, int *offset, gboolean s
*seq = wmem_strdup(wmem_packet_scope(), ""); /* zero-length string */
}
+ /* XXX: this returns a length which is only known to be less than reported_length_remaining,
+ but it could still be more than captured length, no? */
return slength; /* return length */
}
@@ -4356,7 +4359,7 @@ dissect_giop_request_1_1 (tvbuff_t * tvb, packet_info * pinfo,
if ( len > 0)
{
- col_append_fstr(pinfo->cinfo, COL_INFO, ": op=%s", operation);
+ col_append_fstr(pinfo->cinfo, COL_INFO, ": op=%s", format_text(operation, (size_t)len));
proto_tree_add_string(request_tree, hf_giop_req_operation, tvb, offset - len, len, operation);
}
@@ -4481,7 +4484,7 @@ dissect_giop_request_1_2 (tvbuff_t * tvb, packet_info * pinfo,
if ( len > 0)
{
- col_append_fstr(pinfo->cinfo, COL_INFO, ": op=%s", operation);
+ col_append_fstr(pinfo->cinfo, COL_INFO, ": op=%s", format_text(operation, (size_t)len));
proto_tree_add_string(request_tree, hf_giop_req_operation, tvb, offset - len, len, operation);
}