Wireshark-commits: [Wireshark-commits] master-2.4 dc3a662: nettrace_3gpp_32_423: fix memleak and co
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=dc3a6624e6be4e53f4f5f870312893d259807acf
Submitter: Peter Wu (peter@xxxxxxxxxxxxx)
Changed: branch: master-2.4
Repository: wireshark
Commits:
dc3a662 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>
(cherry picked from commit 7c9f333ad0f79d695f530e05cdcceceb7d54d545)
Reviewed-on: https://code.wireshark.org/review/27365
Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
Actions performed:
from c95df54 Fix the check for getexecname().
adds dc3a662 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(-)