debug: Improve fdelt_chk error message

It is not a "buffer overflow detected" but an out of range
bit on fd_set

Signed-off-by: Cristian Rodríguez <crrodriguez@opensuse.org>
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
This commit is contained in:
Cristian Rodríguez 2022-03-13 18:40:24 +00:00 committed by Siddhesh Poyarekar
parent 866c599182
commit 811c635dba
1 changed files with 2 additions and 1 deletions

View File

@ -15,6 +15,7 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
#include <stdio.h>
#include <sys/select.h>
@ -22,7 +23,7 @@ long int
__fdelt_chk (long int d)
{
if (d < 0 || d >= FD_SETSIZE)
__chk_fail ();
__fortify_fail ("bit out of range 0 - FD_SETSIZE on fd_set");
return d / __NFDBITS;
}