summaryrefslogtreecommitdiff
path: root/include/stdio.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/stdio.h')
-rw-r--r--include/stdio.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/stdio.h b/include/stdio.h
index 372fd3e..cc16e46 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -47,6 +47,7 @@ _FORTIFY_FN(fgets) char *fgets(char * _FORTIFY_POS0 __s, int __n, FILE *__f)
47 return __orig_fgets(__s, __n, __f); 47 return __orig_fgets(__s, __n, __f);
48} 48}
49 49
50__access(write_only, 1)
50_FORTIFY_FN(fread) size_t fread(void * _FORTIFY_POS0 __d, size_t __n, 51_FORTIFY_FN(fread) size_t fread(void * _FORTIFY_POS0 __d, size_t __n,
51 size_t __m, FILE *__f) 52 size_t __m, FILE *__f)
52{ 53{
@@ -59,6 +60,7 @@ _FORTIFY_FN(fread) size_t fread(void * _FORTIFY_POS0 __d, size_t __n,
59 return __orig_fread(__d, __n, __m, __f); 60 return __orig_fread(__d, __n, __m, __f);
60} 61}
61 62
63__access(read_only, 1)
62_FORTIFY_FN(fwrite) size_t fwrite(const void * _FORTIFY_POS0 __d, size_t __n, 64_FORTIFY_FN(fwrite) size_t fwrite(const void * _FORTIFY_POS0 __d, size_t __n,
63 size_t __m, FILE *__f) 65 size_t __m, FILE *__f)
64{ 66{
@@ -71,6 +73,7 @@ _FORTIFY_FN(fwrite) size_t fwrite(const void * _FORTIFY_POS0 __d, size_t __n,
71 return __orig_fwrite(__d, __n, __m, __f); 73 return __orig_fwrite(__d, __n, __m, __f);
72} 74}
73 75
76__access(read_write, 1, 2)
74_FORTIFY_FN(vsnprintf) int vsnprintf(char * _FORTIFY_POS0 __s, size_t __n, 77_FORTIFY_FN(vsnprintf) int vsnprintf(char * _FORTIFY_POS0 __s, size_t __n,
75 const char *__f, __builtin_va_list __v) 78 const char *__f, __builtin_va_list __v)
76{ 79{
@@ -112,6 +115,7 @@ _FORTIFY_FN(vsprintf) int vsprintf(char * _FORTIFY_POS0 __s, const char *__f,
112 * 3) not implementing these under clang, which is what we do for now 115 * 3) not implementing these under clang, which is what we do for now
113 */ 116 */
114 117
118__access(read_write, 1, 2)
115_FORTIFY_FN(snprintf) int snprintf(char *__s, size_t __n, 119_FORTIFY_FN(snprintf) int snprintf(char *__s, size_t __n,
116 const char *__f, ...) 120 const char *__f, ...)
117{ 121{