[dovecot-cvs] dovecot/src/imap commands-util.c,1.16,1.17

cras at procontrol.fi cras at procontrol.fi
Tue Jan 21 13:20:16 EET 2003


Update of /home/cvs/dovecot/src/imap
In directory danu:/tmp/cvs-serv10739

Modified Files:
	commands-util.c 
Log Message:
store/append crashed if no custom flags were being set (ie. almost always)



Index: commands-util.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/commands-util.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- commands-util.c	20 Jan 2003 14:52:51 -0000	1.16
+++ commands-util.c	21 Jan 2003 11:20:14 -0000	1.17
@@ -131,7 +131,8 @@
 	max_flags = MAIL_CUSTOM_FLAGS_COUNT;
 
 	memset(flags, 0, sizeof(*flags));
-	flags->custom_flags = t_new(const char *, flags->custom_flags_count);
+	flags->custom_flags = flags->custom_flags_count == 0 ? NULL :
+		t_new(const char *, flags->custom_flags_count);
 
 	flag_pos = 0;
 	while (args->type != IMAP_ARG_EOL) {




More information about the dovecot-cvs mailing list