Xi Ruoyao
64b1a44183
libio: Add nonnull attribute for most FILE * arguments in stdio.h
...
During the review of a GCC analyzer test case, we found most stdio
functions accepting a FILE * argument expect it to be nonnull and just
segfault when the argument is NULL. Add nonnull attribute for them.
fflush and fflush_unlocked are well defined when __stream is NULL so
they are not touched.
For fputs, fgets, fread, fwrite, fprintf, vfprintf, and their unlocked
version, if __stream is empty but there is nothing to read or write,
they did not segfault. But the standard disallow __stream to be empty
here, so nonnull attribute is also added for them. Note that this may
blow up some old code already subtly broken.
Also add __nonnull for _chk variants and __fortify_function versions for
them.
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Reviewed-by: Alejandro Colomar <alx@kernel.org>
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
2023-09-26 20:11:38 -04:00
..
2023-09-26 20:11:38 -04:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-06-13 19:59:08 -04:00
2017-02-16 17:33:18 -05:00
2023-06-19 09:15:05 -04:00
2023-06-01 12:40:05 -04:00
2023-06-01 12:40:05 -04:00
2023-06-01 12:40:05 -04:00
2023-06-01 12:40:05 -04:00
2017-02-16 17:33:18 -05:00
2023-06-01 12:40:05 -04:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-03-27 13:57:55 -03:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-07-05 21:24:06 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-07-03 09:55:43 +02:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-03-27 13:57:55 -03:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2019-02-18 16:37:00 +01:00
2023-01-06 21:14:39 +00:00
2023-03-28 10:12:30 -03:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-31 22:22:02 +01:00
2023-01-25 08:01:00 +01:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-03-27 13:57:55 -03:00
2023-01-06 21:14:39 +00:00
2023-07-03 09:55:43 +02:00
2023-07-05 16:59:48 +02:00
2023-03-27 13:57:55 -03:00
2023-01-06 21:14:39 +00:00
2023-03-27 13:57:55 -03:00
2023-06-02 01:39:48 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-03-27 13:57:55 -03:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-03-27 13:57:55 -03:00
2023-09-26 20:11:38 -04:00
2023-03-27 13:57:55 -03:00
2023-03-27 13:57:55 -03:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2022-12-19 18:56:55 +01:00
2022-09-22 08:48:04 -03:00
2021-09-03 22:06:44 +05:30
2018-10-17 09:34:13 +02:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2019-06-20 17:32:07 +00:00
2023-01-06 21:14:39 +00:00
2022-03-08 14:25:32 -03:00
2021-04-16 11:26:39 -07:00
2021-04-16 11:26:39 -07:00
2021-04-16 11:26:39 -07:00
2021-04-16 11:26:39 -07:00
2021-04-16 11:26:39 -07:00
2021-04-16 11:26:39 -07:00
2023-01-06 21:14:39 +00:00
2021-04-16 11:26:39 -07:00
2022-09-22 08:48:04 -03:00
2018-03-13 08:31:56 -04:00
2023-07-20 23:42:56 +02:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-02 10:58:49 +01:00
2017-02-16 17:33:18 -05:00
2017-02-16 17:33:18 -05:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-06-02 01:39:48 +00:00
2016-06-11 14:50:16 -07:00
2018-02-21 14:39:54 -05:00
2023-01-06 21:14:39 +00:00
2021-05-16 15:21:18 -06:00
2023-06-02 01:39:48 +00:00
2019-01-02 13:53:52 -02:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-06-02 01:39:48 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2017-09-09 12:41:54 +02:00
2021-05-16 15:21:18 -06:00
2023-06-02 01:39:48 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2021-06-02 07:32:19 +02:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-09-08 23:00:04 +02:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-03-27 13:57:55 -03:00
2023-01-06 21:14:39 +00:00
2023-03-27 13:57:55 -03:00
2023-01-06 21:14:39 +00:00
2023-01-06 21:14:39 +00:00
2023-03-27 13:57:55 -03:00