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

dovecot at dovecot.org dovecot at dovecot.org
Tue May 29 18:38:28 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.0/rev/a13f0750a473
changeset: 13094:a13f0750a473
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 3fff8093ab5b -r a13f0750a473 src/lib/restrict-access.c
--- a/src/lib/restrict-access.c	Wed May 16 18:57:05 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