diff options
author | Frederic Berat <fberat@redhat.com> | 2023-06-12 17:18:20 +0200 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2023-06-13 19:59:08 -0400 |
commit | a84dcb4bdfe5070f2327da693d8b025c89b4877a (patch) | |
tree | e551263f0622ab6dd69fe3ff1adf4aa0790320a9 /stdio-common/bug4.c | |
parent | 127c21c0e2f669454835f78fc03079866282c19b (diff) | |
download | glibc-a84dcb4bdfe5070f2327da693d8b025c89b4877a.tar.gz glibc-a84dcb4bdfe5070f2327da693d8b025c89b4877a.tar.xz glibc-a84dcb4bdfe5070f2327da693d8b025c89b4877a.zip |
tests: replace fread by xfread
With fortification enabled, fread calls return result needs to be checked, has it gets the __wur macro enabled. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'stdio-common/bug4.c')
-rw-r--r-- | stdio-common/bug4.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/stdio-common/bug4.c b/stdio-common/bug4.c index cf7fe116eb..4059ff75b3 100644 --- a/stdio-common/bug4.c +++ b/stdio-common/bug4.c @@ -2,6 +2,8 @@ #include <unistd.h> #include <string.h> +#include <support/xstdio.h> + int stdio_block_read = 1, stdio_block_write = 1; int @@ -30,7 +32,7 @@ main (int argc, char *argv[]) fseek (f, 8180L, 0); fwrite ("Where does this text come from?", 1, 31, f); fseek (f, 8180L, 0); - fread (buffer, 1, 31, f); + xfread (buffer, 1, 31, f); fwrite (buffer, 1, 31, stdout); fclose (f); remove (filename); |