dovecot-2.2: Fixed assert-crash on some situations when user had...

dovecot at dovecot.org dovecot at dovecot.org
Sun Jun 24 20:57:39 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/fe688ecd7564
changeset: 14639:fe688ecd7564
user:      Timo Sirainen <tss at iki.fi>
date:      Tue May 29 18:38:01 2012 +0300
description:
Fixed assert-crash on some situations when user had no supplementary groups.

diffstat:

 src/lib/restrict-access.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 03ea2388bb27 -r fe688ecd7564 src/lib/restrict-access.c
--- a/src/lib/restrict-access.c	Wed May 23 00:24:06 2012 +0300
+++ b/src/lib/restrict-access.c	Tue May 29 18:38:01 2012 +0300
@@ -126,7 +126,7 @@
 		i_fatal("getgroups() failed: %m");
 
 	/* @UNSAFE */
-	gid_list = t_new(gid_t, gid_count);
+	gid_list = t_new(gid_t, gid_count+1); /* +1 in case gid_count=0 */
 	if ((ret = getgroups(gid_count, gid_list)) < 0)
 		i_fatal("getgroups() failed: %m");
 


More information about the dovecot-cvs mailing list