mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
improve out-of-bounds checking with GCC 10 attribute access [BZ #25219]
Adds the access attribute newly introduced in GCC 10 to the subset of function declarations that are already covered by _FORTIFY_SOURCE and that don't have corresponding GCC built-in equivalents. Reviewed-by: DJ Delorie <dj@redhat.com>
This commit is contained in:
@@ -566,7 +566,7 @@ extern int putw (int __w, FILE *__stream);
|
||||
This function is a possible cancellation point and therefore not
|
||||
marked with __THROW. */
|
||||
extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
|
||||
__wur;
|
||||
__wur __attr_access ((__write_only__, 1, 2));
|
||||
|
||||
#if __GLIBC_USE (DEPRECATED_GETS)
|
||||
/* Get a newline-terminated string from stdin, removing the newline.
|
||||
@@ -589,7 +589,8 @@ extern char *gets (char *__s) __wur __attribute_deprecated__;
|
||||
or due to the implementation it is a cancellation point and
|
||||
therefore not marked with __THROW. */
|
||||
extern char *fgets_unlocked (char *__restrict __s, int __n,
|
||||
FILE *__restrict __stream) __wur;
|
||||
FILE *__restrict __stream) __wur
|
||||
__attr_access ((__write_only__, 1, 2));
|
||||
#endif
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user