From: Kevin Ryde <user42@zip.com.au>
Subject: sigaction signum range test
Date: Fri, 02 Apr 2004 08:08:02 +1000 [thread overview]
Message-ID: <87lllfuzb1.fsf@zip.com.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 390 bytes --]
* scmsigs.c (scm_sigaction_for_thread): Correction to signum range
test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
calling "(sigaction NSIG)".
This is just an off-by-one, signum==NSIG is the only bad case. You
can provoke it under electric fence with
(sigaction NSIG)
I see the 1.6 has no such range check at all, perhaps it'd be a good
idea.
[-- Attachment #2: scmsigs.c.sigrange.diff --]
[-- Type: text/plain, Size: 722 bytes --]
--- scmsigs.c.~1.78.~ 2003-04-07 08:05:26.000000000 +1000
+++ scmsigs.c 2004-04-01 08:06:32.000000000 +1000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2004 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -299,7 +299,7 @@
SCM old_handler;
SCM_VALIDATE_INUM_COPY (1, signum, csig);
- if (csig < 0 || csig > NSIG)
+ if (csig < 0 || csig >= NSIG)
SCM_OUT_OF_RANGE (1, signum);
#if defined(HAVE_SIGACTION)
#if defined(SA_RESTART) && defined(HAVE_RESTARTABLE_SYSCALLS)
[-- Attachment #3: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
next reply other threads:[~2004-04-01 22:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-01 22:08 Kevin Ryde [this message]
2004-05-10 22:14 ` sigaction signum range test Marius Vollmer
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
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lllfuzb1.fsf@zip.com.au \
--to=user42@zip.com.au \
/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).