public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/release/2.36/master] get_nscd_addresses: Fix subscript typos [BZ #29605]
@ 2022-09-28 16:49 Siddhesh Poyarekar
  0 siblings, 0 replies; only message in thread
From: Siddhesh Poyarekar @ 2022-09-28 16:49 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=227c9035872fc9e9e2cf56ec8f89219747ee19bc

commit 227c9035872fc9e9e2cf56ec8f89219747ee19bc
Author: Jörg Sonnenberger <joerg@bec.de>
Date:   Mon Sep 26 13:59:16 2022 -0400

    get_nscd_addresses: Fix subscript typos [BZ #29605]
    
    Fix the subscript on air->family, which was accidentally set to COUNT
    when it should have remained as I.
    
    Resolves: BZ #29605
    
    Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    (cherry picked from commit c9226c03da0276593a0918eaa9a14835183343e8)

Diff:
---
 sysdeps/posix/getaddrinfo.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index bcff909b2f..5cda9bb072 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -540,11 +540,11 @@ get_nscd_addresses (const char *name, const struct addrinfo *req,
 	  at[count].addr[2] = htonl (0xffff);
 	}
       else if (req->ai_family == AF_UNSPEC
-	       || air->family[count] == req->ai_family)
+	       || air->family[i] == req->ai_family)
 	{
-	  at[count].family = air->family[count];
+	  at[count].family = air->family[i];
 	  memcpy (at[count].addr, addrs, size);
-	  if (air->family[count] == AF_INET6)
+	  if (air->family[i] == AF_INET6)
 	    res->got_ipv6 = true;
 	}
       at[count].next = at + count + 1;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-09-28 16:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-28 16:49 [glibc/release/2.36/master] get_nscd_addresses: Fix subscript typos [BZ #29605] Siddhesh Poyarekar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).