diff options
author | Andreas Schwab <schwab@suse.de> | 2014-02-18 10:57:25 +0100 |
---|---|---|
committer | Andreas Schwab <schwab@suse.de> | 2014-02-19 14:39:21 +0100 |
commit | ab09bf616ad527b249aca5f2a4956fd526f0712f (patch) | |
tree | 8983f676bf5ac2c5e418a4276dcd25f28755ea70 /ChangeLog | |
parent | c6af2d896ce07740ad5170eaed3c0bb7720e079e (diff) | |
download | glibc-ab09bf616ad527b249aca5f2a4956fd526f0712f.tar.gz glibc-ab09bf616ad527b249aca5f2a4956fd526f0712f.tar.xz glibc-ab09bf616ad527b249aca5f2a4956fd526f0712f.zip |
Properly fix memory leak in _nss_dns_gethostbyname4_r with big DNS answer
Instead of trying to guess whether the second buffer needs to be freed set a flag at the place it is allocated
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index 8747120d7d..e7a956e8aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,40 @@ +2014-02-18 Andreas Schwab <schwab@suse.de> + + [BZ #16574] + * resolv/res_send.c (send_vc): Add parameter ansp2_malloced. + Store non-zero if the second buffer was newly allocated. + (send_dg): Likewise. + (__libc_res_nsend): Add parameter ansp2_malloced and pass it down + to send_vc and send_dg. + (res_nsend): Pass NULL for ansp2_malloced. + * resolv/res_query.c (__libc_res_nquery): Add parameter + answerp2_malloced and pass it down to __libc_res_nsend. + (res_nquery): Pass additional NULL to __libc_res_nquery. + (__libc_res_nsearch): Add parameter answerp2_malloced and pass it + down to __libc_res_nquery and __libc_res_nquerydomain. Deallocate + second answer buffer if answerp2_malloced was set. + (res_nsearch): Pass additional NULL to __libc_res_nsearch. + (__libc_res_nquerydomain): Add parameter + answerp2_malloced and pass it down to __libc_res_nquery. + (res_nquerydomain): Pass additional NULL to + __libc_res_nquerydomain. + * resolv/nss_dns/dns-network.c (_nss_dns_getnetbyname_r): Pass + additional NULL to __libc_res_nsend and __libc_res_nquery. + * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyname3_r): Pass + additional NULL to __libc_res_nsearch. + (_nss_dns_gethostbyname4_r): Revert last change. Use new + parameter of __libc_res_nsearch to check for separately allocated + second buffer. + (_nss_dns_gethostbyaddr2_r): Pass additional NULL to + __libc_res_nquery. + * resolv/nss_dns/dns-canon.c (_nss_dns_getcanonname_r): Pass + additional NULL to __libc_res_nquery. + * resolv/gethnamaddr.c (gethostbyname2): Pass additional NULL to + __libc_res_nsearch. + (gethostbyaddr): Pass additional NULL to __libc_res_nquery. + * include/resolv.h: Update prototypes of __libc_res_nquery, + __libc_res_nsearch, __libc_res_nsend. + 2014-02-18 Joseph Myers <joseph@codesourcery.com> * math/auto-libm-test-in: Add tests of fma. |