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=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 17026 invoked from network); 28 Dec 2022 16:21:22 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 28 Dec 2022 16:21:22 -0000 Received: (qmail 25912 invoked by uid 550); 28 Dec 2022 16:21:18 -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 25880 invoked from network); 28 Dec 2022 16:21:18 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fifth.space; s=20190812; t=1672244465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IH3WuJZ3qdtyq0ZfuK1TyXO3stfDDdg0W+YwHYz3MU0=; b=qwhbnD7TwI4vbjPOuKZ+ppC3CuwdUCseFnOmje9ghpSsubwvbpxxhk3T10v/D2wJiyMrpL rKdAeNGFCmOhBFpflteaThzXRaYkcBrDneB1u6QIFVLOSvDq7Cq/ouxZ2lEt70foog3y6I XgG9erLz++9SLQpx5ZOSL9vJqwaYvg+GeTDOdyfZD8TiBEf7wxbEJfM/WJyJ0Z7d1X4HeD RejIvRuoVARmKZmgiQLs4UMSVAUnw2cvJMERT9NWaQJjgD3GCcBcKvGmAC7beYx+6k7I9v b8YOPUjqERQn0iG/VmODVYTuP/XZ/M8Kli6axThw6Mt2LyARAMYgKrjiJXhIuQ== Date: Wed, 28 Dec 2022 17:20:57 +0100 From: Quentin Rameau To: musl@lists.openwall.com Message-ID: <20221228172057.384bebbe.quinq@fifth.space> In-Reply-To: <20221228120643.txqcsrlok2i7qf5h@gen2.localdomain> References: <20221228120643.txqcsrlok2i7qf5h@gen2.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [musl] Bug in swab > > This should also work for coinciding memories > > and musl's implementation does not take that into account. =20 >=20 > The POSIX manpage declares the prototype of swab(3p) with the `restrict` > qualifier [0]. So calling this function with overlapping memory region is > not correct - the bug is in the calling code. On top of that, it explicitly specifies: =E2=80=9CIf copying takes place between objects that overlap, the behavior = is undefined=E2=80=9D