From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2206) id 313FA385781A; Mon, 28 Mar 2022 13:42:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 313FA385781A MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" From: Siddhesh Poyarekar To: glibc-cvs@sourceware.org Subject: [glibc] debug: Improve fdelt_chk error message X-Act-Checkin: glibc X-Git-Author: =?utf-8?q?Cristian_Rodr=C3=ADguez?= X-Git-Refname: refs/heads/master X-Git-Oldrev: 866c599182e87f116440b5d854f9e99533c48eb3 X-Git-Newrev: 811c635dbae42a0ced67d2bffa8ad68b58d6e44e Message-Id: <20220328134247.313FA385781A@sourceware.org> Date: Mon, 28 Mar 2022 13:42:47 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2022 13:42:47 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=811c635dbae42a0ced67d2bffa8ad68b58d6e44e commit 811c635dbae42a0ced67d2bffa8ad68b58d6e44e Author: Cristian Rodríguez Date: Sun Mar 13 18:40:24 2022 +0000 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 Reviewed-by: Siddhesh Poyarekar Diff: --- debug/fdelt_chk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debug/fdelt_chk.c b/debug/fdelt_chk.c index c5f16462ad..30f5a4bec1 100644 --- a/debug/fdelt_chk.c +++ b/debug/fdelt_chk.c @@ -15,6 +15,7 @@ License along with the GNU C Library; if not, see . */ +#include #include @@ -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; }