URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=6257b65481112d584bcd55de3945c8601a1c5160
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
6257b65 by Guy Harris (guy@xxxxxxxxxxxx):
Fix allocation of option bocks in pcapng_read().
We don't need to allocate an WTAP_OPTION_BLOCK_IF_DESCR option block;
don't use the value we allocated.
We must not allocate an WTAP_OPTION_BLOCK_IF_STATS option block until we
need it, as we may have to allocate *more than one* of them here! The
old code would reuse the same block, adding it more than once, causing a
"freeing already freed data"/"freeing non-allocated data" error on some
platforms.
Change-Id: I8582627c1f5deecfd4f6490dcdf8c31ee3809d12
Reviewed-on: https://code.wireshark.org/review/14130
Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
Actions performed:
from 40fe88d Fix another heap-based bufffer overflow.
adds 6257b65 Fix allocation of option bocks in pcapng_read().
Summary of changes:
wiretap/pcapng.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)