diff options
author | Guy Harris <guy@alum.mit.edu> | 2005-01-05 09:53:03 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2005-01-05 09:53:03 +0000 |
commit | c2e6d1e6863c23e19a04df0fea02a04f2b56e91e (patch) | |
tree | 08a25240648760b20bd38a85545e49609c7e248e /epan/dissectors/packet-daap.c | |
parent | 81df0567ab066451cd72cf2affcc1d637acbb4b9 (diff) |
Use "tvb_format_text()" with %s format strings, so that we handle
non-printable strings.
svn path=/trunk/; revision=12952
Diffstat (limited to 'epan/dissectors/packet-daap.c')
-rw-r--r-- | epan/dissectors/packet-daap.c | 8 |
1 files changed, 3 insertions, 5 deletions
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 */ |