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] Does proto_deregister_field really work?

From: Peter Wu <peter@xxxxxxxxxxxxx>
Date: Sun, 27 May 2018 12:19:49 +0200
Hi Richard,

On Wed, May 09, 2018 at 04:51:13PM -0700, Richard Sharpe wrote:
> Hi folks,
> 
> I have an application where I want to change the specification of an
> HF entry or two, and found proto_deregister_field.
> 
> It would seem that I can deregister a field and then register a new
> version of it ... as long as I am careful.
> 
> What is the cost of doing this?
> 
> Is an alternative to register a fixed array but modify the entries?

What was the use case for this dynamic field update? What property were
you interested in?

I am not sure how well dynamic field (de)registration is supposed to
work. It is causing some memory leaks and I am worried that trying to
solve those can result in other memory safety issues (use-after-free).
-- 
Kind regards,
Peter Wu
https://lekensteyn.nl