diff options
Diffstat (limited to 'socket/bits/socket2.h')
-rw-r--r-- | socket/bits/socket2.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/socket/bits/socket2.h b/socket/bits/socket2.h index c0421ce244..05418ba9c3 100644 --- a/socket/bits/socket2.h +++ b/socket/bits/socket2.h @@ -33,13 +33,15 @@ extern ssize_t __REDIRECT (__recv_chk_warn, __fortify_function ssize_t recv (int __fd, void *__buf, size_t __n, int __flags) { - if (__bos0 (__buf) != (size_t) -1) + if (__glibc_objsize0 (__buf) != (size_t) -1) { if (!__builtin_constant_p (__n)) - return __recv_chk (__fd, __buf, __n, __bos0 (__buf), __flags); + return __recv_chk (__fd, __buf, __n, __glibc_objsize0 (__buf), + __flags); - if (__n > __bos0 (__buf)) - return __recv_chk_warn (__fd, __buf, __n, __bos0 (__buf), __flags); + if (__n > __glibc_objsize0 (__buf)) + return __recv_chk_warn (__fd, __buf, __n, __glibc_objsize0 (__buf), + __flags); } return __recv_alias (__fd, __buf, __n, __flags); } @@ -64,14 +66,14 @@ __fortify_function ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len) { - if (__bos0 (__buf) != (size_t) -1) + if (__glibc_objsize0 (__buf) != (size_t) -1) { if (!__builtin_constant_p (__n)) - return __recvfrom_chk (__fd, __buf, __n, __bos0 (__buf), __flags, - __addr, __addr_len); - if (__n > __bos0 (__buf)) - return __recvfrom_chk_warn (__fd, __buf, __n, __bos0 (__buf), __flags, - __addr, __addr_len); + return __recvfrom_chk (__fd, __buf, __n, __glibc_objsize0 (__buf), + __flags, __addr, __addr_len); + if (__n > __glibc_objsize0 (__buf)) + return __recvfrom_chk_warn (__fd, __buf, __n, __glibc_objsize0 (__buf), + __flags, __addr, __addr_len); } return __recvfrom_alias (__fd, __buf, __n, __flags, __addr, __addr_len); } |