diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2005-06-02 07:29:24 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2005-06-02 07:29:24 +0000 |
commit | e3e7b4d2293505602e789c40530901b4905825bb (patch) | |
tree | 6706017bbd7297af5e3d1b39f5ec22ace4de06ab /epan | |
parent | 837934eafcacf789b9ce5458ec0b415affb32aea (diff) |
bugfix: don't use match_strval() in combination with format strings (as it may return NULL) but val_to_str()
I don't know if the output as hex is appropriate, someone with more WBXML knowledge might have a look (however, it's done for unknown values only)
svn path=/trunk/; revision=14522
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-wbxml.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/dissectors/packet-wbxml.c b/epan/dissectors/packet-wbxml.c index 15b8473000..88ad58fefe 100644 --- a/epan/dissectors/packet-wbxml.c +++ b/epan/dissectors/packet-wbxml.c @@ -5109,13 +5109,13 @@ dissect_wbxml_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* Compose the summary line */ if ( publicid ) { summary = g_strdup_printf("%s, Public ID: \"%s\"", - match_strval (version, vals_wbxml_versions), - match_strval (publicid, vals_wbxml_public_ids)); + val_to_str (version, vals_wbxml_versions, "(unknown 0x%x)"), + val_to_str (publicid, vals_wbxml_public_ids, "(unknown 0x%x)")); } else { /* Read length of Public ID from string table */ len = tvb_strsize (tvb, str_tbl + publicid_index); summary = g_strdup_printf("%s, Public ID: \"%s\"", - match_strval (version, vals_wbxml_versions), + val_to_str (version, vals_wbxml_versions, "(unknown 0x%x)"), tvb_format_text (tvb, str_tbl + publicid_index, len - 1)); } @@ -6351,7 +6351,7 @@ parse_wbxml_attribute_list_defined (proto_tree *tree, tvbuff_t *tvb, "| %-10s (Invalid Token!) " "| WBXML parsing stops here.", level, *codepage_attr, - match_strval (peek, vals_wbxml1x_global_tokens)); + val_to_str (peek, vals_wbxml1x_global_tokens, "(unknown 0x%x)")); /* Move to end of buffer */ off = tvb_len; break; @@ -6538,7 +6538,7 @@ parse_wbxml_attribute_list (proto_tree *tree, tvbuff_t *tvb, "| %-10s (Invalid Token!) " "| WBXML parsing stops here.", level, *codepage_attr, - match_strval (peek, vals_wbxml1x_global_tokens)); + val_to_str (peek, vals_wbxml1x_global_tokens, "(unknown 0x%x)")); /* Move to end of buffer */ off = tvb_len; break; |