dovecot-2.0: t_get_current_dir(): Don't overflow buffer with >12...

dovecot at dovecot.org dovecot at dovecot.org
Wed Dec 16 21:13:13 EET 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/482d43792090
changeset: 10505:482d43792090
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Dec 16 14:13:09 2009 -0500
description:
t_get_current_dir(): Don't overflow buffer with >128 length directories.

diffstat:

1 file changed, 1 insertion(+)
src/lib/abspath.c |    1 +

diffs (11 lines):

diff -r 9c2fe6d0b684 -r 482d43792090 src/lib/abspath.c
--- a/src/lib/abspath.c	Wed Dec 16 14:03:40 2009 -0500
+++ b/src/lib/abspath.c	Wed Dec 16 14:13:09 2009 -0500
@@ -36,6 +36,7 @@ int t_get_current_dir(const char **dir_r
 		if (errno != ERANGE)
 			return -1;
 		size = nearest_power(size+1);
+		dir = t_buffer_get(size);
 	}
 	t_buffer_alloc(strlen(dir) + 1);
 	*dir_r = dir;


More information about the dovecot-cvs mailing list