diff options
| author | jvoisin | 2025-11-12 22:28:13 +0100 |
|---|---|---|
| committer | jvoisin | 2025-11-14 13:55:31 +0100 |
| commit | bf242b15e1f7873bdb940c2441b5e57747bc2f81 (patch) | |
| tree | dd80ee51edf4542b65a9e49db369dc44d089c359 /include/strings.h | |
| parent | c93890993aded39be2f8f820fb19d8efe2cd9184 (diff) | |
Add `access` annotations
Diffstat (limited to '')
| -rw-r--r-- | include/strings.h | 3 |
1 files changed, 3 insertions, 0 deletions
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" { | |||
| 31 | || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE+0 < 700) | 31 | || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE+0 < 700) |
| 32 | #undef bcopy | 32 | #undef bcopy |
| 33 | #undef bzero | 33 | #undef bzero |
| 34 | __access(write_only, 2, 3) | ||
| 35 | __access(read_only, 1, 3) | ||
| 34 | _FORTIFY_FN(bcopy) void bcopy(const void * _FORTIFY_POS0 __s, | 36 | _FORTIFY_FN(bcopy) void bcopy(const void * _FORTIFY_POS0 __s, |
| 35 | void * _FORTIFY_POS0 __d, size_t __n) | 37 | void * _FORTIFY_POS0 __d, size_t __n) |
| 36 | { | 38 | { |
| @@ -42,6 +44,7 @@ _FORTIFY_FN(bcopy) void bcopy(const void * _FORTIFY_POS0 __s, | |||
| 42 | return __orig_bcopy(__s, __d, __n); | 44 | return __orig_bcopy(__s, __d, __n); |
| 43 | } | 45 | } |
| 44 | 46 | ||
| 47 | __access(write_only, 1, 2) | ||
| 45 | _FORTIFY_FN(bzero) void bzero(void * _FORTIFY_POS0 __s, size_t __n) | 48 | _FORTIFY_FN(bzero) void bzero(void * _FORTIFY_POS0 __s, size_t __n) |
| 46 | { | 49 | { |
| 47 | size_t __b = __bos(__s, 0); | 50 | size_t __b = __bos(__s, 0); |
