From bf242b15e1f7873bdb940c2441b5e57747bc2f81 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Wed, 12 Nov 2025 22:28:13 +0100 Subject: Add `access` annotations --- include/strings.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/strings.h') diff --git a/include/strings.h b/include/strings.h index 862b7be..3b6b765 100644 --- a/include/strings.h +++ b/include/strings.h @@ -31,6 +31,8 @@ extern "C" { || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE+0 < 700) #undef bcopy #undef bzero +__access(write_only, 2, 3) +__access(read_only, 1, 3) _FORTIFY_FN(bcopy) void bcopy(const void * _FORTIFY_POS0 __s, void * _FORTIFY_POS0 __d, size_t __n) { @@ -42,6 +44,7 @@ _FORTIFY_FN(bcopy) void bcopy(const void * _FORTIFY_POS0 __s, return __orig_bcopy(__s, __d, __n); } +__access(write_only, 1, 2) _FORTIFY_FN(bzero) void bzero(void * _FORTIFY_POS0 __s, size_t __n) { size_t __b = __bos(__s, 0); -- cgit v1.3