From 792e010c299c4483d0fac836dba8119e6112c165 Mon Sep 17 00:00:00 2001 From: Daniele Forsi Date: Sun, 9 May 2010 19:34:56 +0200 Subject: Remove leading space when unfolding According to RFC 2425 paragraph 5.8.1, the leading whitespace on folded lines must be removed when unfolding happens. Origin: vendor, http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=testcase.c;att=1;bug=539442 Bug-Debian: http://bugs.debian.org/539442 Forwarded: https://sourceforge.net/tracker/?func=detail&aid=3084903&group_id=37192&atid=419516 Last-Update: 2010-12-23 Applied-Upstream: http://vformat.cvs.sourceforge.net/viewvc/vformat/src/vformat/src/vf_parser.c?revision=1.26&view=markup --- src/vf_parser.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vf_parser.c b/src/vf_parser.c index 2c7221c..1197154 100644 --- a/src/vf_parser.c +++ b/src/vf_parser.c @@ -333,9 +333,9 @@ bool_t vf_parse_text( /* Ignore */ } else - if (SPACE == c) + if ((SPACE == c) || (TAB == c)) { - ok = append_to_curr_string(&(p_parse->prop.value.v.s), NULL, &c, 1); + /* Ignore leading white space characters when unfolding */ p_parse->state = _VF_STATE_RFC822VALUE; } -- 1.7.6.3 .