[dovecot-cvs] dovecot/src/lib-imap imap-bodystructure.c,1.50,1.51

cras at dovecot.org cras at dovecot.org
Sun Sep 11 16:19:28 EEST 2005


Update of /var/lib/cvs/dovecot/src/lib-imap
In directory talvi:/tmp/cvs-serv16350/lib-imap

Modified Files:
	imap-bodystructure.c 
Log Message:
"stack frame changed" crashfix



Index: imap-bodystructure.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-imap/imap-bodystructure.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- imap-bodystructure.c	3 Jul 2005 14:18:53 -0000	1.50
+++ imap-bodystructure.c	11 Sep 2005 13:19:26 -0000	1.51
@@ -164,7 +164,7 @@
 	case 't':
 	case 'T':
 		if (strcasecmp(name, "Type") == 0 && d->content_type == NULL) {
-			d->str = t_str_new(256);
+			d->str = str_new(default_pool, 256);
 			message_content_parse_header(value, value_len,
 						     parse_content_type,
 						     parse_save_params_list, d);
@@ -177,6 +177,7 @@
 			}
 			d->content_type_params =
 				p_strdup_empty(pool, str_c(d->str));
+			str_free(d->str);
 		}
 		if (strcasecmp(name, "Transfer-Encoding") == 0 &&
 		    d->content_transfer_encoding == NULL) {
@@ -202,12 +203,13 @@
 		}
 		if (strcasecmp(name, "Disposition") == 0 &&
 		    d->content_disposition_params == NULL) {
-			d->str = t_str_new(256);
+			d->str = str_new(default_pool, 256);
 			message_content_parse_header(value, value_len,
 						     parse_content_disposition,
 						     parse_save_params_list, d);
 			d->content_disposition_params =
 				p_strdup_empty(pool, str_c(d->str));
+			str_free(d->str);
 		}
 		break;
 	}



More information about the dovecot-cvs mailing list