|
Message-ID: <20230224145316.75b96fe9@inria.fr>
Date: Fri, 24 Feb 2023 14:53:16 +0100
From: Jₑₙₛ Gustedt <jens.gustedt@...ia.fr>
To: Rich Felker <dalias@...c.org>
Cc: musl@...ts.openwall.com, Tamir Duberstein <tamird@...gle.com>
Subject: Re: undefined behavior in fread.c
on Fri, 24 Feb 2023 08:34:14 -0500 you (Rich Felker <dalias@...c.org>)
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ₑₙₛ
--
:: ICube :::::::::::::::::::::::::::::: deputy director ::
:: Université de Strasbourg :::::::::::::::::::::: ICPS ::
:: INRIA Nancy Grand Est :::::::::::::::::::::::: Camus ::
:: :::::::::::::::::::::::::::::::::::: ☎ +33 368854536 ::
:: https://icube-icps.unistra.fr/index.php/Jens_Gustedt ::
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.