Wireshark-commits: [Wireshark-commits] master 7c9f333: nettrace_3gpp_32_423: fix memleak and copy o

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sat, 05 May 2018 03:24:22 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=7c9f333ad0f79d695f530e05cdcceceb7d54d545
Submitter: Anders Broman (a.broman58@xxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

7c9f333 by Peter Wu (peter@xxxxxxxxxxxxx):

    nettrace_3gpp_32_423: fix memleak and copy of uninitialized memory
    
    When protocol="map", but the name attribute value is invalid, a memleak
    occurs. Observe also that dissector_table_str is 22 bytes (21 characters
    plus nul) and rounding up to a multiple of 4 means that 2 bytes of
    uninitialized memory could be copied. Avoid that by copying the actual
    length. Memory leak was found by Clang Static Analyzer.
    
    Change-Id: I41f5b104449e108191e505611411a8fb18f1f5db
    Fixes: v2.1.0rc0-2545-g4b4c7a76c3 ("[Nettrace] Add parsing of some HSS records.")
    Reviewed-on: https://code.wireshark.org/review/27350
    Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    

Actions performed:

    from  7591ed8   Test: Add dftest to our tests.
    adds  7c9f333   nettrace_3gpp_32_423: fix memleak and copy of uninitialized memory


Summary of changes:
 wiretap/nettrace_3gpp_32_423.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)