bionic_fortify: clarify error message for an out of bounds FD.
It seems clearer to include FD_SETSIZE in the message. set_size
is sizeof(fd_set) so there's an extra mental hoop to jump if that's
in the error message.
Test: make
Change-Id: I5cdb62465b658ac0eaeccbfb826d135820cf613a
diff --git a/libc/private/bionic_fortify.h b/libc/private/bionic_fortify.h
index 7f22963..3c3292e 100644
--- a/libc/private/bionic_fortify.h
+++ b/libc/private/bionic_fortify.h
@@ -52,7 +52,7 @@
__fortify_fatal("%s: file descriptor %d < 0", fn, fd);
}
if (__predict_false(fd >= FD_SETSIZE)) {
- __fortify_fatal("%s: file descriptor %d >= FD_SETSIZE %zu", fn, fd, set_size);
+ __fortify_fatal("%s: file descriptor %d >= FD_SETSIZE %zu", fn, fd, FD_SETSIZE);
}
if (__predict_false(set_size < sizeof(fd_set))) {
__fortify_fatal("%s: set size %zu is too small to be an fd_set", fn, set_size);