Wireshark-commits: [Wireshark-commits] master 996dcc0: Do a deep copy in wtap_block_add_custom_opti

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Fri, 15 Jul 2016 08:32:14 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=996dcc038dea197924285a6717b522a57f95fd65
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

996dcc0 by Guy Harris (guy@xxxxxxxxxxxx):

    Do a deep copy in wtap_block_add_custom_option().
    
    That way, we don't have to worry about multiple instances of an option
    pointing to the same data. and having to worry about freeing data that's
    pointed to by another instance.
    
    Change-Id: I3470a9eebf346023713fd0d6ff2451d727c25089
    Reviewed-on: https://code.wireshark.org/review/16471
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    

Actions performed:

    from  ced2071   Fix the snapshot length part of the "same interface?" check.
    adds  996dcc0   Do a deep copy in wtap_block_add_custom_option().


Summary of changes:
 wiretap/erf.c           |    4 +++-
 wiretap/pcapng.c        |    4 ++--
 wiretap/wtap.h          |    2 +-
 wiretap/wtap_opttypes.c |   40 +++++++++++++++++++++++++++++++++++++++-
 4 files changed, 45 insertions(+), 5 deletions(-)