debug: Improve fdelt_chk error message
authorCristian Rodríguez <crrodriguez@opensuse.org>
Sun, 13 Mar 2022 18:40:24 +0000 (18:40 +0000)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Mon, 28 Mar 2022 13:40:30 +0000 (19:10 +0530)
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>
debug/fdelt_chk.c

index c5f1646..30f5a4b 100644 (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;
 }