[gmime] Be linient with from-lines
- From: Jeffrey Stedfast <fejj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gmime] Be linient with from-lines
- Date: Sat, 10 Mar 2012 01:56:06 +0000 (UTC)
commit d311f576baf750476e06e9a1367a2dc1793ea7eb
Author: Jeffrey Stedfast <fejj gnome org>
Date: Fri Mar 9 20:55:25 2012 -0500
Be linient with from-lines
2012-03-09 Jeffrey Stedfast <fejj gnome org>
* gmime/gmime-parser.c (parser_step_headers): Be lenient from
"From " lines found in message headers. Fixes bug #671680.
ChangeLog | 5 +++++
gmime/gmime-parser.c | 9 ++++++---
2 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8eba5df..3985d67 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-03-09 Jeffrey Stedfast <fejj gnome org>
+
+ * gmime/gmime-parser.c (parser_step_headers): Be lenient from
+ "From " lines found in message headers. Fixes bug #671680.
+
2012-02-20 Jeffrey Stedfast <fejj gnome org>
* README: Bumped version
diff --git a/gmime/gmime-parser.c b/gmime/gmime-parser.c
index 71997e7..8a087d9 100644
--- a/gmime/gmime-parser.c
+++ b/gmime/gmime-parser.c
@@ -1051,9 +1051,12 @@ parser_step_headers (GMimeParser *parser)
}
if (priv->state == GMIME_PARSER_STATE_MESSAGE_HEADERS) {
- /* Be a little more strict when scanning toplevel message headers. */
- priv->state = GMIME_PARSER_STATE_ERROR;
- return -1;
+ /* Be a little more strict when scanning toplevel message
+ * headers, but remain lenient with From-lines. */
+ if ((inptr - start) != 4 || strncmp (start, "From ", 5) != 0) {
+ priv->state = GMIME_PARSER_STATE_ERROR;
+ return -1;
+ }
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]