[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
sigaction signum range test
From: |
Kevin Ryde |
Subject: |
sigaction signum range test |
Date: |
Fri, 02 Apr 2004 08:08:02 +1000 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux) |
* 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.
--- 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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- sigaction signum range test,
Kevin Ryde <=