Wireshark-bugs: [Wireshark-bugs] [Bug 8382] MS-MMS dissector crash
Date: Sun, 03 Mar 2013 03:49:43 +0000

Comment # 32 on bug 8382 from
(In reply to comment #18)
> I think a "better" solution would be to support "unicode" through
> proto_tree_add_item so some of these extra steps aren't necessary, but you'd
> still have this issue with server_version.

You mean like

    proto_tree_add_item(tree, field, tvb, offset, length,
        {ENC_UTF_8|ENC_NA, ENC_UCS_2|ENC_{BIG,LITTLE}_ENDIAN,
         ENC_UTF_16|ENC_{BIG,LITTLE}_ENDIAN});

("Unicode" isn't the same thing as UCS-2 or UTF-16; UTF-8, UTF-16, and UCS-4
are all encodings of Unicode, and UCS-2 is an encoding of a subset of Unicode).

That should work now for counted strings, although it's currently not doing
very hard work, in that

    1) it doesn't do anything about invalid UTF-8 sequences;

    2) it doesn't do anything about UTF-16 surrogate pairs;

    3) it doesn't do anything about surrogates appearing in UCS-2 strings.

It doesn't currently work for null-terminated strings; tvb_get_stringz_enc()
needs to be enhanced to handle that.


You are receiving this mail because:
  • You are watching all bug changes.