Wireshark-dev: Re: [Wireshark-dev] [PATCH][UPDATE] ptvcursor : one step further?
From: Jeff Morriss <jeff.morriss@xxxxxxxxxxx>
Date: Sun, 11 Mar 2007 13:36:35 +0800


Sebastien Tandel wrote:
Hi,

  I've updated the patch for ptvcursor taking into account the ideas of Guy.

Features supported by ptvcursor :
  - multiple levels (256 max.), allocation per 8 levels.
  - Two new functions creating an item in the tree and pushing a subtree at the same time. These two functions accept an undefined length (SUBTREE_UNDEFINED_LENGTH). The length of the item is set once the subtree is pop'ed.
    1) ptvcursor_add_with_subtree
    2) ptvcursor_add_text_with_subtree


If it sounds good I'll do a section for the README.developer.

Well, it looks OK to my (simple) eyes.

One thing looks wrong to me, though: using g_renew() to malloc memory but there are also DISSECTOR_ASSERT()s in the code. If the assertion is taken dissection of that packet will stop and the memory will be leaked.

Shouldn't that be changed to ep_ malloc'd memory?

Unless anyone else has comments, could you write that README.developer patch, too?