From mboxrd@z Thu Jan 1 00:00:00 1970 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=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 5680 invoked from network); 25 Jan 2021 08:40:42 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 25 Jan 2021 08:40:42 -0000 Received: (qmail 20055 invoked by uid 550); 25 Jan 2021 08:40:36 -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 20021 invoked from network); 25 Jan 2021 08:40:36 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1611564024; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:To:From:From:Subject: Sender; bh=ZB3tDQlao96j/tSICKtyInWQLTDjkf5G3xEwsKhZQ9s=; b=DMYsO2s+OcGT/ZvFRkfQeclT4/1FgGYg1DenFcq4e4ml3rBtlsAf8VJVte3/N0RciK iya5ootWA1j734pxN9pn9c20EYIseiMTbFRItj0yCUc3DnMMj/cFN7t+gKh/5KfvxKvg 3sp1amNm3S/e6zdB8V3oyRrXr85Ga2ZpW9Wnff7PfXM/CgVM6hsCoWVEd9FAynLBdvGy 8J+yfo6fCRT5xGxwSeoouQuGZssHq+46zZdjGaGK33U/YB6mYbuM7aIkkrHeWZj/nblg LlUOhiEAZ6v+OukrYT+aLoDlrVkYvqV/SAnVqFNvkAEE4RNqGjMnkoGIycGK23wSaHGZ Da1w== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOHqfyyvs=" X-RZG-CLASS-ID: mo00 From: Bruno Haible To: musl@lists.openwall.com Date: Mon, 25 Jan 2021 09:40:23 +0100 Message-ID: <11940511.InkjXumKWH@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-197-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <3521697.b4TYcCAa2N@omega> References: <3521697.b4TYcCAa2N@omega> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: [musl] insufficient checking in posix_spawn_file_actions_addclose Similarly, POSIX [1] says: "The posix_spawn_file_actions_addclose() function shall fail if: [EBADF] The value specified by fildes is negative." However, in musl libc 1.2.2, this test program exits with status 2: ======================================================================== #include int main () { posix_spawn_file_actions_t actions; if (posix_spawn_file_actions_init (&actions) != 0) return 1; if (posix_spawn_file_actions_addclose (&actions, -5) == 0) return 2; return 0; } ======================================================================== Best regards, Bruno [1] https://pubs.opengroup.org/onlinepubs/9699919799/functions/posix_spawn_file_actions_addclose.html