diff options
Diffstat (limited to 'libc/bionic/__FD_chk.cpp')
-rw-r--r-- | libc/bionic/__FD_chk.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libc/bionic/__FD_chk.cpp b/libc/bionic/__FD_chk.cpp index 5c2338d5f..af8427a67 100644 --- a/libc/bionic/__FD_chk.cpp +++ b/libc/bionic/__FD_chk.cpp @@ -32,39 +32,39 @@ extern "C" int __FD_ISSET_chk(int fd, fd_set* set, size_t set_size) { if (__predict_false(fd < 0)) { - __fortify_chk_fail("file descriptor is negative for FD_ISSET", 0); + __fortify_chk_fail("FD_ISSET: file descriptor < 0", 0); } if (__predict_false(fd >= FD_SETSIZE)) { - __fortify_chk_fail("file descriptor is too big for FD_ISSET", 0); + __fortify_chk_fail("FD_ISSET: file descriptor >= FD_SETSIZE", 0); } if (__predict_false(set_size < sizeof(fd_set))) { - __fortify_chk_fail("set is too small", 0); + __fortify_chk_fail("FD_ISSET: set is too small", 0); } return FD_ISSET(fd, set); } extern "C" void __FD_CLR_chk(int fd, fd_set* set, size_t set_size) { if (__predict_false(fd < 0)) { - __fortify_chk_fail("file descriptor is negative for FD_CLR", 0); + __fortify_chk_fail("FD_CLR: file descriptor < 0", 0); } if (__predict_false(fd >= FD_SETSIZE)) { - __fortify_chk_fail("file descriptor is too big for FD_CLR", 0); + __fortify_chk_fail("FD_CLR: file descriptor >= FD_SETSIZE", 0); } if (__predict_false(set_size < sizeof(fd_set))) { - __fortify_chk_fail("set is too small", 0); + __fortify_chk_fail("FD_CLR: set is too small", 0); } FD_CLR(fd, set); } extern "C" void __FD_SET_chk(int fd, fd_set* set, size_t set_size) { if (__predict_false(fd < 0)) { - __fortify_chk_fail("file descriptor is negative for FD_SET", 0); + __fortify_chk_fail("FD_SET: file descriptor < 0", 0); } if (__predict_false(fd >= FD_SETSIZE)) { - __fortify_chk_fail("file descriptor is too big for FD_SET", 0); + __fortify_chk_fail("FD_SET: file descriptor >= FD_SETSIZE", 0); } if (__predict_false(set_size < sizeof(fd_set))) { - __fortify_chk_fail("set is too small", 0); + __fortify_chk_fail("FD_SET: set is too small", 0); } FD_SET(fd, set); } |