From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id CD5E227D82 for ; Thu, 25 Jan 2024 16:31:12 +0100 (CET) Received: (qmail 9607 invoked by uid 550); 25 Jan 2024 15:29:00 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 9575 invoked from network); 25 Jan 2024 15:29:00 -0000 Date: Thu, 25 Jan 2024 16:30:58 +0100 From: Ismael Luceno To: Markus Wichmann Cc: musl@lists.openwall.com, Rich Felker Message-ID: References: <20240125070950.28673-1-ismael@iodev.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam: Yes Subject: Re: [musl] [PATCH] fix avoidable segfault in catclose On 25/Jan/2024 15:11, Markus Wichmann wrote: <...> > BTW, POSIX does not say catclose() is required (or even allowed) to > accept (nl_catd)-1 as argument, its description of the return value of > catopen() also says that it is only suitable for use with catclose() > when successful. It does imply it, it mentions that it could take invalid descriptors and that it should return -1 & errno == EBADF. Also, this is relevant to code found in the wild, not an application of my own. -- Ismael Luceno http://iodev.co.uk/