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

Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 50063: /trunk/ /trunk/epan/dissector

From: Evan Huus <eapache@xxxxxxxxx>
Date: Wed, 19 Jun 2013 23:30:01 -0700
Partly backed out in r50073. Wmem is stricter about letting you
allocate ephemeral memory when there isn't actually a packet being
dissected, because then we have no guarantee how long that memory will
stick around. The SNMP dissector (and others backed out in the same
revision) use scoped memory in UAT callbacks that can be called
entirely unrelated to packet/file dissection state, which was causing
the assertion you saw.

These dissectors should really be fixed not to use scoped memory in
this way, which may end up being a non-trivial change, so for now the
old way is enough to make SNMP work again.

Evan

On Wed, Jun 19, 2013 at 10:05 PM, Maynard, Chris
<Christopher.Maynard@xxxxxxxxx> wrote:
> With this change to packet-snmp.c, Wireshark crashes for me at startup on Windows 7 x64 if I have the snmp_users file from https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7359, i.e.:
>
> # This file is automatically generated, DO NOT MODIFY.
> ,"pippo","MD5","pippoxxx","DES","PIPPOxxx"
> ,"pippo2","SHA1","pippoxxx","DES","PIPPOxxx"
> ,"pippo3","SHA1","pippoxxx","AES","PIPPOxxx"
> ,"pippo4","MD5","pippoxxx","AES","PIPPOxxx"
>
> That information comes directly from the SampleCaptures wiki page: http://wiki.wireshark.org/SampleCaptures?highlight=%28pippo%29#SNMP.
>
> If I delete/move/rename the snmp_users file, Wireshark happily starts up just fine.
> - Chris
>
> -----Original Message-----
> From: wireshark-commits-bounces@xxxxxxxxxxxxx [mailto:wireshark-commits-bounces@xxxxxxxxxxxxx] On Behalf Of eapache@xxxxxxxxxxxxx
> Sent: Wednesday, June 19, 2013 6:48 PM
> To: wireshark-commits@xxxxxxxxxxxxx
> Subject: [Wireshark-commits] rev 50063: /trunk/ /trunk/epan/dissectors/: packet-ldap.c packet-m3ap.c packet-pres.c packet-ranap.c packet-ros.c packet-sbc-ap.c packet-snmp.c packet-snmp.h packet-spnego.c packet-t38.c ...
>
> http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=50063
>
> User: eapache
> Date: 2013/06/19 03:47 PM
>
> Log:
>  Convert the rest of the ASN1 dissectors from emem to wmem.
>
> Directory: /trunk/epan/dissectors/
>   Changes    Path               Action
>   +10 -10    packet-ldap.c      Modified
>   +7 -8      packet-m3ap.c      Modified
>   +3 -3      packet-pres.c      Modified
>   +2 -2      packet-ranap.c     Modified
>   +2 -2      packet-ros.c       Modified
>   +7 -8      packet-sbc-ap.c    Modified
>   +32 -32    packet-snmp.c      Modified
>   +1 -1      packet-snmp.h      Modified
>   +2 -2      packet-spnego.c    Modified
>   +4 -4      packet-t38.c       Modified
>
>
> (9 files not shown)
>
> --
>
> CONFIDENTIALITY NOTICE: The information contained in this email message is intended only for use of the intended recipient. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately delete it from your system and notify the sender by replying to this email.  Thank you.
> ___________________________________________________________________________
> Sent via:    Wireshark-commits mailing list <wireshark-commits@xxxxxxxxxxxxx>
> Archives:    http://www.wireshark.org/lists/wireshark-commits
> Unsubscribe: https://wireshark.org/mailman/options/wireshark-commits
>              mailto:wireshark-commits-request@xxxxxxxxxxxxx?subject=unsubscribe