commit 9014b0266147dbb74d5d9e6e2c24ae9d21ad7e07
parent 6f5423255b6d78b0d6979e6319642ae530f3e2b7
Author: jvoisin <julien.voisin@dustri.org>
Date: Wed, 10 Jul 2024 16:03:42 +0200
Fix access annotations to snprintf/sprintf
In the same spirit as the previous commit.
Reported-by: ncopa
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/stdio.h b/include/stdio.h
@@ -268,7 +268,7 @@ _FORTIFY_FN(vasprintf) int vasprintf(char **strp, const char *fmt, __builtin_va_
#undef printf
#undef fprintf
-__fh_access(read_write, 1, 2)
+__fh_access(write_only, 1, 2)
__fh_access(read_only, 3)
__fh_format(printf, 3, 4)
_FORTIFY_FN(snprintf) int snprintf(char *__s, size_t __n,
@@ -286,7 +286,7 @@ _FORTIFY_FN(snprintf) int snprintf(char *__s, size_t __n,
}
__fh_format(printf, 2, 3)
-__fh_access(read_write, 1)
+__fh_access(write_only, 1)
__fh_access(read_only, 2)
_FORTIFY_FN(sprintf) int sprintf(char *__s, const char *__f, ...)
{