diff --git a/CHANGELOG.md b/CHANGELOG.md index 4dac685..341f462 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). --- +# [0.5.3] - 2023-12-19 + +### + +- Fixed issue causing valgrind memory error due to non-initialized struct in add_if_index() in zfw.c. + # [0.5.2] - 2023-11-27 ### diff --git a/src/zfw.c b/src/zfw.c index 91142fb..3688e0d 100644 --- a/src/zfw.c +++ b/src/zfw.c @@ -149,7 +149,7 @@ char *monitor_interface; char *tc_interface; char *object_file; char *direction_string; -const char *argp_program_version = "0.5.2"; +const char *argp_program_version = "0.5.3"; struct ring_buffer *ring_buffer; __u8 if_list[MAX_IF_LIST_ENTRIES]; @@ -1359,7 +1359,7 @@ int add_if_index(struct interface intf) open_if_map(); } if_map.map_fd = if_fd; - struct ifindex_ip4 o_ifip4; + struct ifindex_ip4 o_ifip4 = {0}; if_map.key = (uint64_t)&intf.index; if_map.flags = BPF_ANY; if_map.value = (uint64_t)&o_ifip4;