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=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 10617 invoked from network); 24 Feb 2023 13:53:34 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 24 Feb 2023 13:53:34 -0000 Received: (qmail 26600 invoked by uid 550); 24 Feb 2023 13:53:31 -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 26561 invoked from network); 24 Feb 2023 13:53:30 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:cc:subject:message-id:in-reply-to: references:mime-version; bh=2UW802Jl+JudMd2cWjG2G0K1c/ORG6T7/NtVkdV28i4=; b=HXYAOMW5cj15gdIN6kqonb4FAaHTHqvA1NOzF6xvgm0lgAE3BbJqcszl W7nS8fR+aRQNPqZ1zr86JmpVWK63pY9obcX9cBgqyxkMxPR85El52Ubzb 8ExmhfOGWfbhyDMz/LGjZglfeUR+IQbDa8Ad34uH7cMvKzSUXWUeyYM9l E=; Authentication-Results: mail3-relais-sop.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=jens.gustedt@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="5.97,324,1669071600"; d="scan'208";a="48562774" Date: Fri, 24 Feb 2023 14:53:16 +0100 From: =?UTF-8?B?SuKCkeKCmeKCmw==?= Gustedt To: Rich Felker Cc: musl@lists.openwall.com, Tamir Duberstein Message-ID: <20230224145316.75b96fe9@inria.fr> In-Reply-To: <20230224133413.GE4163@brightrain.aerifal.cx> References: <20230224133413.GE4163@brightrain.aerifal.cx> Organization: inria.fr X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) X-Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAAXNSR0IArs4c6QAAACRQTFRFERslNjAsLTE9Ok9wUk9TaUs8iWhSrYZkj42Rz6aD3sGZ MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/4CcN7EtM_vxBTm1pIXXdege"; protocol="application/pgp-signature"; micalg=pgp-sha1 Subject: Re: [musl] undefined behavior in fread.c --Sig_/4CcN7EtM_vxBTm1pIXXdege Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable on Fri, 24 Feb 2023 08:34:14 -0500 you (Rich Felker ) wrote: > Is there any indication that passing NULL as the first argument to > fread is not itself undefined? Normally I would expect that to be the > case. I don't think so. The corresponding text of the C standard clearly indicates that the first argument is expected to point to an array. By that the provisions of 7.1.4 take effect: If an argument to a function has an invalid value (such as ..., or a null pointer, ...) ..., the behavior is undefined. Thanks J=E2=82=91=E2=82=99=E2=82=9B --=20 :: ICube :::::::::::::::::::::::::::::: deputy director :: :: Universit=C3=A9 de Strasbourg :::::::::::::::::::::: ICPS :: :: INRIA Nancy Grand Est :::::::::::::::::::::::: Camus :: :: :::::::::::::::::::::::::::::::::::: =E2=98=8E +33 368854536 :: :: https://icube-icps.unistra.fr/index.php/Jens_Gustedt :: --Sig_/4CcN7EtM_vxBTm1pIXXdege Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSN9stI2OFN1pLljN0P0+hp2tU34gUCY/jBTAAKCRAP0+hp2tU3 4tFKAKCVXVKdYavhoeIUgIeOv5X5u/HDPQCggFwDDXTIe7xNFYFxRvcAcdS8B6o= =vMES -----END PGP SIGNATURE----- --Sig_/4CcN7EtM_vxBTm1pIXXdege--