commit d514ad042fc23e74961ce411fdb66962faa54cfc
parent 9a4782d3431dc10e92493b3b843cb30f7bed73e3
Author: Colin Leroy <colin@colino.net>
Date: Fri, 5 Sep 2008 19:05:43 +0000
2008-09-05 [colin] 3.5.0cvs91
* src/procmime.c
Maybe fix bug 1711, 'Save-as attachment crashes'
Possibly wrong free() due to pointer shifting
Diffstat:
4 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,9 @@
+2008-09-05 [colin] 3.5.0cvs91
+
+ * src/procmime.c
+ Maybe fix bug 1711, 'Save-as attachment crashes'
+ Possibly wrong free() due to pointer shifting
+
2008-09-05 [colin] 3.5.0cvs90
* src/compose.c
diff --git a/PATCHSETS b/PATCHSETS
@@ -3502,3 +3502,4 @@
( cvs diff -u -r 1.179.2.226 -r 1.179.2.227 src/imap.c; cvs diff -u -r 1.395.2.387 -r 1.395.2.388 src/summaryview.c; cvs diff -u -r 1.1.2.7 -r 1.1.2.8 src/common/tags.c; cvs diff -u -r 1.1.4.103 -r 1.1.4.104 src/etpan/imap-thread.c; cvs diff -u -r 1.1.4.24 -r 1.1.4.25 src/etpan/imap-thread.h; ) > 3.5.0cvs88.patchset
( cvs diff -u -r 1.395.2.388 -r 1.395.2.389 src/summaryview.c; ) > 3.5.0cvs89.patchset
( cvs diff -u -r 1.382.2.471 -r 1.382.2.472 src/compose.c; ) > 3.5.0cvs90.patchset
+( cvs diff -u -r 1.49.2.114 -r 1.49.2.115 src/procmime.c; ) > 3.5.0cvs91.patchset
diff --git a/configure.ac b/configure.ac
@@ -11,7 +11,7 @@ MINOR_VERSION=5
MICRO_VERSION=0
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=90
+EXTRA_VERSION=91
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
diff --git a/src/procmime.c b/src/procmime.c
@@ -1585,7 +1585,7 @@ static void parse_parameters(const gchar *parameters, GHashTable *table)
param = params;
next = params;
for (; next != NULL; param = next) {
- gchar *attribute, *value, *tmp, *down_attr;
+ gchar *attribute, *value, *tmp, *down_attr, *orig_down_attr;
gint len;
gboolean convert = FALSE;
@@ -1608,7 +1608,8 @@ static void parse_parameters(const gchar *parameters, GHashTable *table)
value++;
down_attr = g_utf8_strdown(attribute, -1);
-
+ orig_down_attr = down_attr;
+
len = strlen(down_attr);
if (down_attr[len - 1] == '*') {
gchar *srcpos, *dstpos, *endpos;
@@ -1676,7 +1677,7 @@ static void parse_parameters(const gchar *parameters, GHashTable *table)
if (g_hash_table_lookup(table, down_attr) == NULL)
g_hash_table_insert(table, g_strdup(down_attr), g_strdup(value));
- g_free(down_attr);
+ g_free(orig_down_attr);
}
for (cur = concatlist; cur != NULL; cur = g_slist_next(cur)) {