Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-dev: Re: [Ethereal-dev] Possible IEEE 802.11 dissector bug

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Gilbert Ramirez <gram@xxxxxxxxxxxxxxx>
Date: Wed, 21 Apr 2004 10:43:20 -0500
On Tuesday 20 April 2004 11:58, Loránd Jakab wrote:
> Hi everyone,
> I have a problem with the PDML output of some IEEE 802.11 frames. I use
> tethereal to transform binary captures to PDML, then I wrote a Perl
> script based on the XML::Parser module to extract some information.
> Recently I came across a probably malformed packed, that causes
> tethereal to output binary data into the PDML file, which breaks the
> parser. The binary data is written to the "show" attribute's value
> field. If it is a malformed packet, it would be best that the dissector
> would put only ASCII charcters in that field, maybe the hexa or octal
> values...
>
> A packet that demonstrates the problem is attached.
>
> Could someone please post a patch?
>
> Thanks,
> Lori

Regardless of whether the packet is malformed, the PDML output needs to 
properly handle any binary data that's in a string.

In this case, the wlan_mgt.tag.interpreation field, an FT_STRING field, has 
the following value:
\016\v\034\032\a\n\037\r\032\017\022\n\005\031\a\006\f\024\003\036\b\024\031\026\t\033\001\036\n\f\016\020

The PDML-producing code currently calls proto_construct_dfilter_string() to 
get the string representation of a field. The functions that that function 
calls (string_repr_len and string_to_repr in ftype-strings.c) need to take 
into account this binary data.

I'll take a look at making these changes.

--gilbert