diff options
author | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2020-12-15 23:50:09 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2020-12-31 16:55:21 +0530 |
commit | f9de8bfe1a731c309b91d175b4f6f4aeb786effa (patch) | |
tree | de1e299076d996829aacc7aecff1ae98c11a87af /io | |
parent | 2a3224c53653214cbba2ec23424702193c80ea3b (diff) | |
download | glibc-f9de8bfe1a731c309b91d175b4f6f4aeb786effa.tar.gz glibc-f9de8bfe1a731c309b91d175b4f6f4aeb786effa.tar.xz glibc-f9de8bfe1a731c309b91d175b4f6f4aeb786effa.zip |
nonstring: Enable __FORTIFY_LEVEL=3
Use __builtin_dynamic_object_size in the remaining functions that don't have compiler builtins as is the case for string functions.
Diffstat (limited to 'io')
-rw-r--r-- | io/bits/poll2.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/io/bits/poll2.h b/io/bits/poll2.h index dca49717db..d204351bd0 100644 --- a/io/bits/poll2.h +++ b/io/bits/poll2.h @@ -35,12 +35,13 @@ extern int __REDIRECT (__poll_chk_warn, (struct pollfd *__fds, nfds_t __nfds, __fortify_function int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout) { - if (__bos (__fds) != (__SIZE_TYPE__) -1) + if (__glibc_objsize (__fds) != (__SIZE_TYPE__) -1) { if (! __builtin_constant_p (__nfds)) - return __poll_chk (__fds, __nfds, __timeout, __bos (__fds)); - else if (__bos (__fds) / sizeof (*__fds) < __nfds) - return __poll_chk_warn (__fds, __nfds, __timeout, __bos (__fds)); + return __poll_chk (__fds, __nfds, __timeout, __glibc_objsize (__fds)); + else if (__glibc_objsize (__fds) / sizeof (*__fds) < __nfds) + return __poll_chk_warn (__fds, __nfds, __timeout, + __glibc_objsize (__fds)); } return __poll_alias (__fds, __nfds, __timeout); @@ -65,13 +66,14 @@ __fortify_function int ppoll (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout, const __sigset_t *__ss) { - if (__bos (__fds) != (__SIZE_TYPE__) -1) + if (__glibc_objsize (__fds) != (__SIZE_TYPE__) -1) { if (! __builtin_constant_p (__nfds)) - return __ppoll_chk (__fds, __nfds, __timeout, __ss, __bos (__fds)); - else if (__bos (__fds) / sizeof (*__fds) < __nfds) + return __ppoll_chk (__fds, __nfds, __timeout, __ss, + __glibc_objsize (__fds)); + else if (__glibc_objsize (__fds) / sizeof (*__fds) < __nfds) return __ppoll_chk_warn (__fds, __nfds, __timeout, __ss, - __bos (__fds)); + __glibc_objsize (__fds)); } return __ppoll_alias (__fds, __nfds, __timeout, __ss); |