summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjvoisin2024-07-10 16:03:42 +0200
committerjvoisin2024-07-10 16:03:42 +0200
commit9014b0266147dbb74d5d9e6e2c24ae9d21ad7e07 (patch)
tree351180bd20de8c0a2a7ef5454d0ea8eee2b53753
parent6f5423255b6d78b0d6979e6319642ae530f3e2b7 (diff)
Fix access annotations to snprintf/sprintf
In the same spirit as the previous commit. Reported-by: ncopa
-rw-r--r--include/stdio.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/stdio.h b/include/stdio.h
index fcd0ac9..c1070a8 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -268,7 +268,7 @@ _FORTIFY_FN(vasprintf) int vasprintf(char **strp, const char *fmt, __builtin_va_
268#undef printf 268#undef printf
269#undef fprintf 269#undef fprintf
270 270
271__fh_access(read_write, 1, 2) 271__fh_access(write_only, 1, 2)
272__fh_access(read_only, 3) 272__fh_access(read_only, 3)
273__fh_format(printf, 3, 4) 273__fh_format(printf, 3, 4)
274_FORTIFY_FN(snprintf) int snprintf(char *__s, size_t __n, 274_FORTIFY_FN(snprintf) int snprintf(char *__s, size_t __n,
@@ -286,7 +286,7 @@ _FORTIFY_FN(snprintf) int snprintf(char *__s, size_t __n,
286} 286}
287 287
288__fh_format(printf, 2, 3) 288__fh_format(printf, 2, 3)
289__fh_access(read_write, 1) 289__fh_access(write_only, 1)
290__fh_access(read_only, 2) 290__fh_access(read_only, 2)
291_FORTIFY_FN(sprintf) int sprintf(char *__s, const char *__f, ...) 291_FORTIFY_FN(sprintf) int sprintf(char *__s, const char *__f, ...)
292{ 292{