fortify-headers

standalone fortify-source implementation
git clone git://git.2f30.org/fortify-headers
Log | Files | Refs | README | LICENSE

commit 62199030394acd30ab44bc21af7078ae993fd149
parent e16b7ad1168ec48c6e5cf5e5d8e2b2c83815b3ea
Author: jvoisin <julien.voisin@dustri.org>
Date:   Wed,  5 Jul 2023 15:48:14 +0200

Add access annotations to sys/socket.h

Diffstat:
Minclude/sys/socket.h | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/sys/socket.h b/include/sys/socket.h @@ -34,6 +34,7 @@ extern "C" { #undef send #undef sendto +__access(write_only, 2, 3) _FORTIFY_FN(recv) ssize_t recv(int __f, void * _FORTIFY_POS0 __s, size_t __n, int __fl) { @@ -44,6 +45,7 @@ _FORTIFY_FN(recv) ssize_t recv(int __f, void * _FORTIFY_POS0 __s, size_t __n, return __orig_recv(__f, __s, __n, __fl); } +__access(write_only, 2, 3) _FORTIFY_FN(recvfrom) ssize_t recvfrom(int __f, void * _FORTIFY_POS0 __s, size_t __n, int __fl, struct sockaddr *__a, socklen_t *__l) @@ -55,6 +57,7 @@ _FORTIFY_FN(recvfrom) ssize_t recvfrom(int __f, void * _FORTIFY_POS0 __s, return __orig_recvfrom(__f, __s, __n, __fl, __a, __l); } +__access(read_only, 2, 3) _FORTIFY_FN(send) ssize_t send(int __f, const void * _FORTIFY_POS0 __s, size_t __n, int __fl) { @@ -65,6 +68,7 @@ _FORTIFY_FN(send) ssize_t send(int __f, const void * _FORTIFY_POS0 __s, return __orig_send(__f, __s, __n, __fl); } +__access(read_only, 2, 3) _FORTIFY_FN(sendto) ssize_t sendto(int __f, const void * _FORTIFY_POS0 __s, size_t __n, int __fl, const struct sockaddr *__a, socklen_t __l)