Page MenuHomeFreeBSD

Fix several memory problems in ldns
Needs ReviewPublic

Authored by trix_juniper.net on Feb 19 2017, 4:34 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 16, 7:05 PM
Unknown Object (File)
Mar 11 2024, 4:48 PM
Unknown Object (File)
Jan 21 2024, 5:24 AM
Unknown Object (File)
Dec 20 2023, 2:14 AM
Unknown Object (File)
Nov 30 2023, 11:48 PM
Unknown Object (File)
Oct 25 2023, 9:58 AM
Unknown Object (File)
Oct 9 2023, 5:24 AM
Unknown Object (File)
Jun 7 2023, 7:17 AM
Subscribers

Details

Reviewers
stevek
des
Summary

str2host.c ldns_str2rdf_str and ldns_str2rdf_long_str have the
same problem. memory assigned to the local pointer 'data' needs
to be freed if the input parameter 'str' is invalid.

radix.c ldns_radix_array_split need to free the memory assigned
to the local pointers 'common' and 's1' when
ldns_radix_prefix_remainer fails and the
ldns_radix_array_split returns.

dnssec_zone.c ldns_dnssec_zone_new_frm_fp_l poison the variable
'newzone' after it is freed so it will not be double freed.

resolver.c ldns_resolver_new_frm_fp_l free the memory assigned
to the local pointer 'r' on error conditions that result in
ldns_resolver_new_frm_fp_l returning

host2str ldns_rdf2buffer_str_ipseckey free the memory assigned
to the local pointer 'gateway_data' on error conditions that
result in the ldns_rdf2buffer_str_ipseckey returning.

Test Plan

Run clang's static analyzer 'scan-build' on each of these files before to show the problem. Run scan-build after to show the problem has been resolved.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

trix_juniper.net retitled this revision from to Fix several memory problems in ldns.
trix_juniper.net updated this object.
trix_juniper.net edited the test plan for this revision. (Show Details)
trix_juniper.net added reviewers: stevek, des.
trix_juniper.net set the repository for this revision to rS FreeBSD src repository - subversion.