From c2e6d1e6863c23e19a04df0fea02a04f2b56e91e Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Wed, 5 Jan 2005 09:53:03 +0000 Subject: Use "tvb_format_text()" with %s format strings, so that we handle non-printable strings. svn path=/trunk/; revision=12952 --- epan/dissectors/packet-daap.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'epan/dissectors/packet-daap.c') diff --git a/epan/dissectors/packet-daap.c b/epan/dissectors/packet-daap.c index 59e2b07572..a797e9178f 100644 --- a/epan/dissectors/packet-daap.c +++ b/epan/dissectors/packet-daap.c @@ -142,7 +142,6 @@ static int dissect_daap_one_tag(proto_tree *tree, tvbuff_t *tvb, int offset, int static void dissect_daap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - proto_item *ti; proto_tree *daap_tree; int offset = 0; @@ -162,8 +161,7 @@ dissect_daap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) */ col_add_str(pinfo->cinfo, COL_INFO, "DAAP Response"); col_append_fstr(pinfo->cinfo, COL_INFO, " [tag: %s, size: %d]", - tvb_get_string(tvb, offset, 4), - tvb_get_ntohl(tvb, offset+4)); + tvb_format_text(tvb, offset, 4), tvb_get_ntohl(tvb, offset+4)); } } @@ -246,8 +244,8 @@ dissect_daap_one_tag(proto_tree *tree, tvbuff_t *tvb, int offset, int length) case daap_asdt: case daap_asul: /* Tags contain strings */ - proto_item_append_text(ti, ", Data: %s", - tvb_get_string(tvb, offset, tagsize)); + proto_item_append_text(ti, ", Data: %s", + tvb_format_text(tvb, offset, tagsize)); break; case daap_mper: /* Tags conain uint64 */ -- cgit v1.2.3