public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] debug: Improve fdelt_chk error message
@ 2022-03-13 18:40 Cristian Rodríguez
  2022-03-14  8:23 ` Siddhesh Poyarekar
  0 siblings, 1 reply; 3+ messages in thread
From: Cristian Rodríguez @ 2022-03-13 18:40 UTC (permalink / raw)
  To: libc-alpha

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] debug: Improve fdelt_chk error message
  2022-03-13 18:40 [PATCH] debug: Improve fdelt_chk error message Cristian Rodríguez
@ 2022-03-14  8:23 ` Siddhesh Poyarekar
  2022-03-28 13:49   ` Siddhesh Poyarekar
  0 siblings, 1 reply; 3+ messages in thread
From: Siddhesh Poyarekar @ 2022-03-14  8:23 UTC (permalink / raw)
  To: Cristian Rodríguez, libc-alpha

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] debug: Improve fdelt_chk error message
  2022-03-14  8:23 ` Siddhesh Poyarekar
@ 2022-03-28 13:49   ` Siddhesh Poyarekar
  0 siblings, 0 replies; 3+ messages in thread
From: Siddhesh Poyarekar @ 2022-03-28 13:49 UTC (permalink / raw)
  To: Cristian Rodríguez, libc-alpha

On 14/03/2022 13:53, Siddhesh Poyarekar wrote:
> 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>

I've pushed this now.

Thanks,
Siddhesh

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-28 13:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-13 18:40 [PATCH] debug: Improve fdelt_chk error message Cristian Rodríguez
2022-03-14  8:23 ` Siddhesh Poyarekar
2022-03-28 13:49   ` Siddhesh Poyarekar

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).