Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 46320: /trunk/epan/dissectors/ /trun

From: Jeff Morriss <jeff.morriss.ws@xxxxxxxxx>
Date: Sat, 01 Dec 2012 22:47:47 -0500
On 12/01/2012 10:23 PM, Evan Huus wrote:
This sounds like something wmem could solve - if there is an
intermediate scope between ep and se in duration then it should be
possible to create another wmem scope for use here.

Yeah, I thought so too but I took the quick way out (to shut the buildbot up).

Is the needed scope for these addresses well defined?

I'm not entirely sure, but it is (apparently) at least the old ep_ scope (in that the memory needs to be around at least until we *start* dissecting the next packet). At least one of the dissectors I looked at used (non-static!) local variables to hold their AT_STRINGZ. :-(

On Sat, Dec 1, 2012 at 9:46 PM, <morriss@xxxxxxxxxxxxx
<mailto:morriss@xxxxxxxxxxxxx>> wrote:

    http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=46320

    User: morriss
    Date: 2012/12/01 06:46 PM

    Log:
      Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8030 :

      Don't store an AT_STRINGZ address in ep_ allocated memory: that
    memory is
      freed before the addresses may be used.  Use se_ memory instead
    (no, that's
      not really ideal either).

      It would appear that several other dissectors have the same problem.

    Directory: /trunk/epan/dissectors/
       Changes    Path                  Action
       +2 -2      packet-bthci_acl.c    Modified