From 9da3c9d23193030efac42e063ed207322bc710a9 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Wed, 7 Jun 2000 21:40:52 +0000 Subject: Properly dereference warning/debug messages. (header_references_decode): 2000-06-07 Not Zed * 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 --- camel/camel-mime-utils.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'camel/camel-mime-utils.c') 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; } -- cgit