From: prj@po.cwru.edu (Paul Jarc)
Cc: guile-devel@gnu.org, Rob Browning <rlb@defaultvalue.org>
Subject: Re: patch ping
Date: Mon, 28 Jul 2003 12:38:20 -0400 [thread overview]
Message-ID: <m3el0a4ne5.fsf@multivac.cwru.edu> (raw)
In-Reply-To: <87ispoq654.fsf@zagadka.ping.de>
Marius Vollmer <mvo@zagadka.de> 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
next prev parent reply other threads:[~2003-07-28 16:38 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-05 21:32 libguile/print.c fixes Paul Jarc
2003-05-06 1:25 ` Rob Browning
2003-05-17 19:55 ` Marius Vollmer
2003-05-06 1:28 ` Rob Browning
2003-05-06 14:51 ` Paul Jarc
2003-05-17 20:01 ` Marius Vollmer
2003-05-19 14:52 ` Paul Jarc
2003-05-19 15:04 ` Marius Vollmer
2003-06-27 15:58 ` Paul Jarc
2003-06-30 22:40 ` Paul Jarc
2003-07-22 15:27 ` patch ping (was: libguile/print.c fixes) Paul Jarc
2003-07-22 16:42 ` Marius Vollmer
2003-07-22 16:47 ` patch ping Paul Jarc
2003-07-27 16:35 ` Marius Vollmer
2003-07-28 16:38 ` Paul Jarc [this message]
2003-09-15 12:39 ` 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=m3el0a4ne5.fsf@multivac.cwru.edu \
--to=prj@po.cwru.edu \
--cc=guile-devel@gnu.org \
--cc=rlb@defaultvalue.org \
/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).