public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Siddhesh Poyarekar <siddhesh@gotplt.org>
To: "Cristian Rodríguez" <crrodriguez@opensuse.org>,
	libc-alpha@sourceware.org
Subject: Re: [PATCH] debug: Improve fdelt_chk error message
Date: Mon, 14 Mar 2022 13:53:15 +0530	[thread overview]
Message-ID: <e9ae31e4-1ecf-6bba-2598-802406919029@gotplt.org> (raw)
In-Reply-To: <20220313184024.10130-1-crrodriguez@opensuse.org>

On 14/03/2022 00:10, Cristian Rodríguez via Libc-alpha wrote:
> 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>

Agreed.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>


> ---
>   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
>      <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;
>   }


  reply	other threads:[~2022-03-14  8:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-13 18:40 Cristian Rodríguez
2022-03-14  8:23 ` Siddhesh Poyarekar [this message]
2022-03-28 13:49   ` Siddhesh Poyarekar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e9ae31e4-1ecf-6bba-2598-802406919029@gotplt.org \
    --to=siddhesh@gotplt.org \
    --cc=crrodriguez@opensuse.org \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).