diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/stdio.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/stdio.h b/include/stdio.h index 4f304a5..1b244f4 100644 --- a/include/stdio.h +++ b/include/stdio.h | |||
| @@ -101,6 +101,8 @@ _FORTIFY_FN(fwrite) size_t fwrite(const void * _FORTIFY_POS0 __d, size_t __n, | |||
| 101 | return __orig_fwrite(__d, __n, __m, __f); | 101 | return __orig_fwrite(__d, __n, __m, __f); |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | __access(read_only, 1) | ||
| 105 | __access(read_only, 2) | ||
| 104 | __malloc(malloc (pclose, 1)) | 106 | __malloc(malloc (pclose, 1)) |
| 105 | __diagnose_as_builtin(__builtin_fwrite, 1, 2) | 107 | __diagnose_as_builtin(__builtin_fwrite, 1, 2) |
| 106 | _FORTIFY_FN(popen) FILE *popen(const char* _FORTIFY_POS0 __c, const char* _FORTIFY_POS0 __t) | 108 | _FORTIFY_FN(popen) FILE *popen(const char* _FORTIFY_POS0 __c, const char* _FORTIFY_POS0 __t) |
| @@ -118,6 +120,7 @@ _FORTIFY_FN(tmpfile) FILE *tmpfile(void) | |||
| 118 | #endif | 120 | #endif |
| 119 | 121 | ||
| 120 | __access(read_write, 1, 2) | 122 | __access(read_write, 1, 2) |
| 123 | __access(read_only, 3) | ||
| 121 | __format(printf, 3, 0) | 124 | __format(printf, 3, 0) |
| 122 | __diagnose_as_builtin(__builtin_vsnprintf, 1, 2, 3, 4) | 125 | __diagnose_as_builtin(__builtin_vsnprintf, 1, 2, 3, 4) |
| 123 | _FORTIFY_FN(vsnprintf) int vsnprintf(char * _FORTIFY_POS0 __s, size_t __n, | 126 | _FORTIFY_FN(vsnprintf) int vsnprintf(char * _FORTIFY_POS0 __s, size_t __n, |
| @@ -131,6 +134,8 @@ _FORTIFY_FN(vsnprintf) int vsnprintf(char * _FORTIFY_POS0 __s, size_t __n, | |||
| 131 | } | 134 | } |
| 132 | 135 | ||
| 133 | __format(printf, 2, 0) | 136 | __format(printf, 2, 0) |
| 137 | __access(read_write, 1) | ||
| 138 | __access(read_only, 2) | ||
| 134 | __diagnose_as_builtin(__builtin_vsprintf, 1, 2, 3) | 139 | __diagnose_as_builtin(__builtin_vsprintf, 1, 2, 3) |
| 135 | _FORTIFY_FN(vsprintf) int vsprintf(char * _FORTIFY_POS0 __s, const char *__f, | 140 | _FORTIFY_FN(vsprintf) int vsprintf(char * _FORTIFY_POS0 __s, const char *__f, |
| 136 | __builtin_va_list __v) | 141 | __builtin_va_list __v) |
| @@ -167,6 +172,7 @@ _FORTIFY_FN(vsprintf) int vsprintf(char * _FORTIFY_POS0 __s, const char *__f, | |||
| 167 | #undef sprintf | 172 | #undef sprintf |
| 168 | 173 | ||
| 169 | __access(read_write, 1, 2) | 174 | __access(read_write, 1, 2) |
| 175 | __access(read_only, 3) | ||
| 170 | __format(printf, 3, 4) | 176 | __format(printf, 3, 4) |
| 171 | _FORTIFY_FN(snprintf) int snprintf(char *__s, size_t __n, | 177 | _FORTIFY_FN(snprintf) int snprintf(char *__s, size_t __n, |
| 172 | const char *__f, ...) | 178 | const char *__f, ...) |
| @@ -179,6 +185,8 @@ _FORTIFY_FN(snprintf) int snprintf(char *__s, size_t __n, | |||
| 179 | } | 185 | } |
| 180 | 186 | ||
| 181 | __format(printf, 2, 3) | 187 | __format(printf, 2, 3) |
| 188 | __access(read_write, 1) | ||
| 189 | __access(read_only, 2) | ||
| 182 | _FORTIFY_FN(sprintf) int sprintf(char *__s, const char *__f, ...) | 190 | _FORTIFY_FN(sprintf) int sprintf(char *__s, const char *__f, ...) |
| 183 | { | 191 | { |
| 184 | size_t __b = __bos(__s, 0); | 192 | size_t __b = __bos(__s, 0); |
