[gmime-devel] another RFC2047-related problem



This is another example of message header causing problem
in gmime parser:

"=?utf-8?Q?MojeOri.pl_przes=C5=82any_przez_Sciaga.pl_ <sciaga maili maupa p?==?utf-8?Q?l>,\n
                ?= m-out-003 sciaga pl"

(This is C syntax - the '\n' at the end means end of line,
which is of course erroneus in this context - this message is not valid,
but other programs, such as Thunderbird, are able to display other headers
and text of the message)

The parser does not recognize the end of RFC2047 word and
enters endless loop.

I would suggest to do the change attached below.
This helps partially:  although the text is not read as intended by the author,
but the parser produces reasonable results.

Regards,
Marek Łętowski



--- gmime-utils.c       (revision 5875)
+++ gmime-utils.c       (revision 5876)
@@ -2034,7 +2034,7 @@

                                        if (*inptr == '\0') {
                                                /* didn't find an end marker... */
-                                               inptr = text;
+                                               inptr = text + 2;  /* avoid endless loop */
                                                goto non_rfc2047;
                                        }






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]