2006-09-20 [colin] 2.4.0cvs201
* src/compose.c Fix free-after-use in some cases (when procmime_encode_content() frees mimeinfo->data.mem and turns it to a temp file)
This commit is contained in:
parent
334f5ce3f2
commit
d7320b1d34
4 changed files with 15 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
|||
2006-09-20 [colin] 2.4.0cvs201
|
||||
|
||||
* src/compose.c
|
||||
Fix free-after-use in some cases (when
|
||||
procmime_encode_content() frees mimeinfo->data.mem
|
||||
and turns it to a temp file)
|
||||
|
||||
2006-09-20 [colin] 2.4.0cvs200
|
||||
|
||||
* src/folderview.c
|
||||
|
|
|
@ -1892,3 +1892,4 @@
|
|||
( cvs diff -u -r 1.15.2.32 -r 1.15.2.33 src/summary_search.c; ) > 2.4.0cvs198.patchset
|
||||
( cvs diff -u -r 1.43.2.47 -r 1.43.2.48 src/prefs_matcher.c; cvs diff -u -r 1.395.2.251 -r 1.395.2.252 src/summaryview.c; cvs diff -u -r 1.68.2.26 -r 1.68.2.27 src/summaryview.h; cvs diff -u -r 1.1.4.7 -r 1.1.4.8 src/gtk/logwindow.h; ) > 2.4.0cvs199.patchset
|
||||
( cvs diff -u -r 1.207.2.121 -r 1.207.2.122 src/folderview.c; cvs diff -u -r 1.395.2.252 -r 1.395.2.253 src/summaryview.c; cvs diff -u -r 1.43.2.51 -r 1.43.2.52 src/toolbar.c; cvs diff -u -r 1.1.4.31 -r 1.1.4.32 src/gtk/gtksctree.c; cvs diff -u -r 1.1.4.7 -r 1.1.4.8 src/gtk/gtksctree.h; ) > 2.4.0cvs200.patchset
|
||||
( cvs diff -u -r 1.382.2.308 -r 1.382.2.309 src/compose.c; ) > 2.4.0cvs201.patchset
|
||||
|
|
|
@ -11,7 +11,7 @@ MINOR_VERSION=4
|
|||
MICRO_VERSION=0
|
||||
INTERFACE_AGE=0
|
||||
BINARY_AGE=0
|
||||
EXTRA_VERSION=200
|
||||
EXTRA_VERSION=201
|
||||
EXTRA_RELEASE=
|
||||
EXTRA_GTK2_VERSION=
|
||||
|
||||
|
|
|
@ -4532,7 +4532,9 @@ static gint compose_write_to_file(Compose *compose, FILE *fp, gint action, gbool
|
|||
mimetext = procmime_mimeinfo_new();
|
||||
mimetext->content = MIMECONTENT_MEM;
|
||||
mimetext->tmp = TRUE; /* must free content later */
|
||||
mimetext->data.mem = buf;
|
||||
/* dup'ed because procmime_encode_content can turn it into a tmpfile
|
||||
* and free the data, which we need later. */
|
||||
mimetext->data.mem = g_strdup(buf);
|
||||
mimetext->type = MIMETYPE_TEXT;
|
||||
mimetext->subtype = g_strdup("plain");
|
||||
g_hash_table_insert(mimetext->typeparameters, g_strdup("charset"),
|
||||
|
@ -4562,6 +4564,7 @@ static gint compose_write_to_file(Compose *compose, FILE *fp, gint action, gbool
|
|||
aval = alertpanel(_("Warning"), msg, GTK_STOCK_CANCEL, GTK_STOCK_OK, NULL);
|
||||
g_free(msg);
|
||||
if (aval != G_ALERTALTERNATE) {
|
||||
g_free(buf);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
@ -4595,6 +4598,8 @@ static gint compose_write_to_file(Compose *compose, FILE *fp, gint action, gbool
|
|||
} else
|
||||
g_node_append(mimemsg->node, mimetext->node);
|
||||
|
||||
g_free(buf);
|
||||
|
||||
/* sign message if sending */
|
||||
if (action == COMPOSE_WRITE_FOR_SEND && compose->use_signing &&
|
||||
privacy_system_can_sign(compose->privacy_system))
|
||||
|
|
Loading…
Reference in a new issue