mbox series

[v2,0/3] Fixes for getnameinfo() with NI_NOFQDN

Message ID 20211210110733.1499984-1-adhemerval.zanella@linaro.org
Headers show
Series Fixes for getnameinfo() with NI_NOFQDN | expand


Adhemerval Zanella Dec. 10, 2021, 11:07 a.m. UTC
Changes from v2:
  * Refactored nrl_domainname_core() and fixed a possible memory leak
    on failure path.

Changes from v1:
  * Keep the double-checked locking optimization.
  * Also check for strdup return for EAI_MEMORY

Adhemerval Zanella (3):
  inet: Fix getnameinfo (NI_NOFQDN) race condition (BZ#28566)
  inet: Remove strdupa from nrl_domainname()
  inet: Return EAI_MEMORY when nrl_domainname() fails to allocate memory

 inet/getnameinfo.c | 200 ++++++++++++++++++++++++---------------------
 1 file changed, 106 insertions(+), 94 deletions(-)