aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNot Zed <NotZed@HelixCode.com>2000-06-08 05:40:52 +0800
committerMichael Zucci <zucchi@src.gnome.org>2000-06-08 05:40:52 +0800
commit9da3c9d23193030efac42e063ed207322bc710a9 (patch)
treec81b72fca33bca53d265611c73b48e3d971c8a5c
parentd96e01691f8a3d7a5f6bf06505eba0f557bc4ed5 (diff)
downloadgsoc2013-evolution-9da3c9d23193030efac42e063ed207322bc710a9.tar.gz
gsoc2013-evolution-9da3c9d23193030efac42e063ed207322bc710a9.tar.zst
gsoc2013-evolution-9da3c9d23193030efac42e063ed207322bc710a9.zip
Properly dereference warning/debug messages. (header_references_decode):
2000-06-07 Not Zed <NotZed@HelixCode.com> * camel-mime-utils.c (header_msgid_decode_internal): Properly dereference warning/debug messages. (header_references_decode): Check we actually have msgid stuff before trying to decode it ... svn path=/trunk/; revision=3467
-rw-r--r--camel/ChangeLog7
-rw-r--r--camel/camel-mime-utils.c14
2 files changed, 15 insertions, 6 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index a8815b5c83..814b09b5f4 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,10 @@
+2000-06-07 Not Zed <NotZed@HelixCode.com>
+
+ * camel-mime-utils.c (header_msgid_decode_internal): Properly
+ dereference warning/debug messages.
+ (header_references_decode): Check we actually have msgid stuff
+ before trying to decode it ...
+
2000-06-06 Jeffrey Stedfast <fejj@helixcode.com>
* camel-imap-stream.[c,h]: Removed
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c
index ae4b0820b8..6dd5ae4ac7 100644
--- a/camel/camel-mime-utils.c
+++ b/camel/camel-mime-utils.c
@@ -1511,7 +1511,7 @@ header_msgid_decode_internal(const char **in)
const char *inptr = *in;
char *msgid = NULL;
- d(printf("decoding Message-ID: '%s'\n", in));
+ d(printf("decoding Message-ID: '%s'\n", *in));
header_decode_lwsp(&inptr);
if (*inptr == '<') {
@@ -1523,13 +1523,13 @@ header_msgid_decode_internal(const char **in)
if (*inptr == '>') {
inptr++;
} else {
- w(g_warning("Missing closing '>' on message id: %s", in));
+ w(g_warning("Missing closing '>' on message id: %s", *in));
}
} else {
- w(g_warning("Cannot find message id in: %s", in));
+ w(g_warning("Cannot find message id in: %s", *in));
}
} else {
- w(g_warning("missing opening '<' on message id: %s", in));
+ w(g_warning("missing opening '<' on message id: %s", *in));
}
*in = inptr;
@@ -1593,7 +1593,8 @@ header_references_decode(const char *in)
if (in == NULL)
return NULL;
- do {
+ header_decode_lwsp(&inptr);
+ while (*inptr == '<') {
last = inptr;
id = header_msgid_decode_internal(&inptr);
if (id) {
@@ -1602,7 +1603,8 @@ header_references_decode(const char *in)
head = node;
node->id = id;
}
- } while (last != inptr);
+ header_decode_lwsp(&inptr);
+ } while (*inptr == '<' && last != inptr);
return head;
}