From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: prj@po.cwru.edu (Paul Jarc) Newsgroups: gmane.lisp.guile.devel Subject: Re: patch ping Date: Mon, 28 Jul 2003 12:38:20 -0400 Organization: What did you have in mind? A short, blunt, human pyramid? Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: References: <87ade0zwwe.fsf@raven.i.defaultvalue.org> <87he7t5olk.fsf@zagadka.ping.de> <878yqqms2h.fsf@zagadka.ping.de> <87ispoq654.fsf@zagadka.ping.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7BIT X-Trace: main.gmane.org 1059410562 20251 80.91.224.249 (28 Jul 2003 16:42:42 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 28 Jul 2003 16:42:42 +0000 (UTC) Cc: guile-devel@gnu.org, Rob Browning Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Jul 28 18:42:41 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19hB3l-00059H-00 for ; Mon, 28 Jul 2003 18:41:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19hB2R-0007z6-HA for guile-devel@m.gmane.org; Mon, 28 Jul 2003 12:39:55 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19hB20-0007YZ-2u for guile-devel@gnu.org; Mon, 28 Jul 2003 12:39:28 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19hB1g-000779-QK for guile-devel@gnu.org; Mon, 28 Jul 2003 12:39:10 -0400 Original-Received: from harris.cns.cwru.edu ([129.22.104.63]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19hB1M-0006ap-HC for guile-devel@gnu.org; Mon, 28 Jul 2003 12:38:48 -0400 Original-Received: from multivac.cwru.edu (multivac.STUDENT.CWRU.Edu [129.22.114.26]) by smtp-a.cwru.edu (iPlanet Messaging Server 5.2 Patch 1 (built Aug 19 2002)) with SMTP id <0HIQ0095AU7XRD@smtp-a.cwru.edu> for guile-devel@gnu.org; Mon, 28 Jul 2003 12:38:21 -0400 (EDT) Original-Received: (qmail 18763 invoked by uid 500); Mon, 28 Jul 2003 16:38:43 +0000 In-reply-to: <87ispoq654.fsf@zagadka.ping.de> Original-To: Marius Vollmer Mail-followup-to: Marius Vollmer , Rob Browning , guile-devel@gnu.org Mail-Copies-To: nobody User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) Original-Lines: 31 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.2 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:2661 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2661 Marius Vollmer wrote: > I tweaked so setgroups function slightly so that it is hopefully > totally type correct. Your version worked only with gids that fit > into a fixnum (30 bits) and there might 32 bit gids out there. Thanks, that looks good. Here's a further patch to take care of the XXX comment. Maybe it's overly paranoid, but I figure it can't hurt. * posix.c (scm_setgroups): Check that the gid list is not too long. Index: libguile/posix.c =================================================================== RCS file: /cvsroot/guile/guile/guile-core/libguile/posix.c,v retrieving revision 1.119 diff -u -r1.119 posix.c --- libguile/posix.c 27 Jul 2003 16:20:21 -0000 1.119 +++ libguile/posix.c 28 Jul 2003 16:35:01 -0000 @@ -253,7 +253,8 @@ } size = ngroups * sizeof (GETGROUPS_T); - /* XXX - if (size / sizeof (GETGROUPS_T) != ngroups) out-of-range */ + if (size / sizeof (GETGROUPS_T) != ngroups) + SCM_OUT_OF_RANGE (SCM_ARG1, SCM_MAKINUM (ngroups)); groups = scm_malloc (size); for(i = 0; i < ngroups; i++) groups [i] = SCM_NUM2ULONG (1, SCM_VECTOR_REF (group_vec, i)); paul _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel