Wireshark mailing list archives

Re: Frame Data Buffer Allocation


From: Guy Harris <guy () alum mit edu>
Date: Mon, 5 Mar 2018 11:29:26 -0800

On Mar 5, 2018, at 2:16 AM, Paul Offord <Paul.Offord () advance7 com> wrote:
 
I’m not sure what I am supposed to do at that point.  Should my block handler just free the 2KB and then g_malloc a 
block of a suitable size?

No, you're supposed to do what every capture file reader does, and grow the buffer to the required size, using 
ws_buffer_assure_space().

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: