From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) by sourceware.org (Postfix) with ESMTPS id 93AC8384841A for ; Tue, 4 May 2021 19:58:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 93AC8384841A Received: by mail-qt1-x82a.google.com with SMTP id a18so7304717qtj.10 for ; Tue, 04 May 2021 12:58:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=bJY84VvW+zjbQ9NPVK0r4oevUr9+b8scgE+jfMmPm/s=; b=AqCdC+o2TkUSuScDs8Tjc/BAZ1B/gkTzHc3HGz60Jlmt+sDCEqCPMTy8bsNsiurlEO rF8NoqgFO2lNWFqvza+Ro2plUayrRlDuDkecAQdTeiTip9LePJ79nkOVTneZnl2yFqru 44B14tn0IFEgzP0oR719hqJMu5nlhJgCdm7hAyOBfbEbTrjmzIh6w60NCeNi4o3UyWHu kBjx8pZWa2828t6+GFsNHjZSvOgdgeLvQL9Mkdlye2SrQK6N0NXBoPHGM+t1WSKPBOFG V8ANMwEDAJRGXnAuQC8i6MsJBVKhASCfFRbsrNdTJBxRkO34rIGWBBFjZVkgM3VdyS/0 i7qg== X-Gm-Message-State: AOAM530b03cuvcUvB5r98MfYsbtd0M79qZ2r8ojKhHE9FcZg8FrodOC7 j6v/iGR9AGqJtq8khBp0tThTfKiKzK4= X-Google-Smtp-Source: ABdhPJyRck53lrF6MThIKOt1RpH696eoU1sPK5dCTudY2Fe4x92KJeEDHFX2On37lYOGdT+82A6jHQ== X-Received: by 2002:ac8:550d:: with SMTP id j13mr1053345qtq.188.1620158324227; Tue, 04 May 2021 12:58:44 -0700 (PDT) Received: from [192.168.0.41] (71-218-14-121.hlrn.qwest.net. [71.218.14.121]) by smtp.gmail.com with ESMTPSA id h10sm4119108qkh.47.2021.05.04.12.58.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 May 2021 12:58:43 -0700 (PDT) Subject: Re: [PATCH] more out of bounds checking improvements To: Florian Weimer Cc: Martin Sebor via Libc-alpha , Joseph Myers References: <176ba75f-4299-073f-8319-66dbf9fe3f42@gmail.com> <87k0ot9trs.fsf@oldenburg.str.redhat.com> <87v98d6ldm.fsf@oldenburg.str.redhat.com> From: Martin Sebor Message-ID: <2a7e377d-60c8-313b-9422-6cd0b4f5224c@gmail.com> Date: Tue, 4 May 2021 13:58:42 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <87v98d6ldm.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 May 2021 19:58:45 -0000 On 4/23/21 10:01 AM, Florian Weimer wrote: > * Martin Sebor: > >> On 4/23/21 4:31 AM, Florian Weimer wrote: >>> * Martin Sebor via Libc-alpha: >>> >>>> diff --git a/sysdeps/gnu/net/if.h b/sysdeps/gnu/net/if.h >>>> index e587a5ce59..30f3e281e5 100644 >>>> --- a/sysdeps/gnu/net/if.h >>>> +++ b/sysdeps/gnu/net/if.h >>>> @@ -191,7 +191,9 @@ __BEGIN_DECLS >>>> /* Convert an interface name to an index, and vice versa. */ >>>> extern unsigned int if_nametoindex (const char *__ifname) __THROW; >>>> -extern char *if_indextoname (unsigned int __ifindex, char *__ifname) __THROW; >>>> +extern char *if_indextoname (unsigned int __ifindex, >>>> + char __ifname[IF_NAMESIZE]) __THROW >>>> + __attr_access ((__write_only__, 2)); >>>> /* Return a list of all interfaces and their indices. */ >>>> extern struct if_nameindex *if_nameindex (void) __THROW; >>> Is the change from a pointer to an array allowed by POSIX? >> >> There's no way for a conforming program to tell how a function pointer >> parameter is declared so I believe it is. > > Hmm, I think you might be right. It's like parameter names in this > regard. You sound disappointed ;) If there are no further comments/concerns I'll retest the patch on top of the latest trunk and if all goes well go ahead with the commit later this week. Martin > > Thanks, > Florian >