From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2206) id 13A5D3857C42; Wed, 28 Sep 2022 16:49:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 13A5D3857C42 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1664383761; bh=qRibQ+sHOZbgWmCR3XyeMBJgTbyxLW3YaDyyUhcS5Jo=; h=From:To:Subject:Date:From; b=EW+ksGAirfGqxTmy8JPYQb5g+Le7SfiwNzT1tn7Oqv1Oe+8vzncUYOwvVa1XeVhon 6cF9H2TvnCF7IB2YmjaT8ENVywjyIyQNAmV+9WPcnwnUrDP1v26tmgj9P98UT8daSm cHTRWmAcUbgZmkmXMKldzq9VlIn2y0NDDQWPex1Q= MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" From: Siddhesh Poyarekar To: glibc-cvs@sourceware.org Subject: [glibc/release/2.36/master] get_nscd_addresses: Fix subscript typos [BZ #29605] X-Act-Checkin: glibc X-Git-Author: =?utf-8?q?J=C3=B6rg_Sonnenberger?= X-Git-Refname: refs/heads/release/2.36/master X-Git-Oldrev: 2628500f5dff1dd99c49a09b418b3b1ea3a6b5d3 X-Git-Newrev: 227c9035872fc9e9e2cf56ec8f89219747ee19bc Message-Id: <20220928164921.13A5D3857C42@sourceware.org> Date: Wed, 28 Sep 2022 16:49:21 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=227c9035872fc9e9e2cf56ec8f89219747ee19bc commit 227c9035872fc9e9e2cf56ec8f89219747ee19bc Author: Jörg Sonnenberger 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 (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;