Wireshark-bugs: [Wireshark-bugs] [Bug 2402] Data string filter crash

Date: Sun, 24 Jun 2012 12:17:37 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2402

Pascal Quantin <pascal.quantin@xxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pascal.quantin@xxxxxxxxx

--- Comment #14 from Pascal Quantin <pascal.quantin@xxxxxxxxx> 2012-06-24 12:17:36 PDT ---
(In reply to comment #13)
> Just a note: Using the same name for FT_FLOAT and FT_DOUBLE types is 100% safe.
> (i.e.:
>   tds.type_varbyte.data.double, tds.type_varbyte.data.float
>   pcp.instance.value.float, pcp.instance.value.double
> )
Thanks,for the hint, pushed in r43460.

BTW, asn2wrs and its auto generated code is a great contributor to this list
(due to the massive usage of FT_NONE labels). Applying the following (hacky
patch:
Index: tools/asn2wrs.py
===================================================================
--- tools/asn2wrs.py    (révision 43451)
+++ tools/asn2wrs.py    (copie de travail)
@@ -1580,7 +1580,10 @@
       else:
         blurb = '"%s"' % (t)
       attr = self.eth_hf[f]['attr'].copy()
-      attr['ABBREV'] = '"%s.%s"' % (self.proto, attr['ABBREV'])
+      if attr['TYPE'] == 'FT_NONE':
+        attr['ABBREV'] = '"%s.%s_label"' % (self.proto, attr['ABBREV'])
+      else:
+        attr['ABBREV'] = '"%s.%s"' % (self.proto, attr['ABBREV'])
       if 'BLURB' not in attr:
         attr['BLURB'] = blurb
       fx.write('    { &%s,\n' % (self.eth_hf[f]['fullname']))
allows to remove 573 lines from the list (but at the cost of a massive update
of all ASN.1 based dissectors...).
As FT_NONE cannot be used for comparisons and prevents comparing "real" fields
with the same auto generated filter name, it might be worth it.

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are watching all bug changes.