From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.lisp.guile.devel Subject: sigaction signum range test Date: Fri, 02 Apr 2004 08:08:02 +1000 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <87lllfuzb1.fsf@zip.com.au> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1080858307 32344 80.91.224.253 (1 Apr 2004 22:25:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 1 Apr 2004 22:25:07 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Apr 02 00:25:00 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1B9AcO-0008Vq-00 for ; Fri, 02 Apr 2004 00:25:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B9AZH-0002zi-20 for guile-devel@m.gmane.org; Thu, 01 Apr 2004 17:21:47 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B9AQ0-0004qP-H4 for guile-devel@gnu.org; Thu, 01 Apr 2004 17:12:12 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B9ANI-00020T-Ox for guile-devel@gnu.org; Thu, 01 Apr 2004 17:09:56 -0500 Original-Received: from [61.8.0.85] (helo=mailout2.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B9AME-0000wT-Kf for guile-devel@gnu.org; Thu, 01 Apr 2004 17:08:18 -0500 Original-Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.0.86]) by mailout2.pacific.net.au (8.12.3/8.12.3/Debian-6.6) with ESMTP id i31M8H5v001849 for ; Fri, 2 Apr 2004 08:08:17 +1000 Original-Received: from localhost (ppp2E4E.dyn.pacific.net.au [61.8.46.78]) by mailproxy1.pacific.net.au (8.12.3/8.12.3/Debian-6.6) with ESMTP id i31M8GGP001514 for ; Fri, 2 Apr 2004 08:08:16 +1000 Original-Received: from gg by localhost with local (Exim 3.36 #1 (Debian)) id 1B9ALy-0000SL-00; Fri, 02 Apr 2004 08:08:02 +1000 Original-To: guile-devel@gnu.org Mail-Copies-To: never User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:3584 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:3584 --=-=-= * 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. --=-=-= Content-Disposition: inline; filename=scmsigs.c.sigrange.diff --- 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) --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel --=-=-=--