classpathx-javamail
[Top][All Lists]
Advanced

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

Re: [Classpathx-javamail] Bug in MBOX classpathx


From: Chris Burdess
Subject: Re: [Classpathx-javamail] Bug in MBOX classpathx
Date: Thu, 17 Feb 2005 11:38:51 +0000

Countach wrote:
There is a bug in the MBOX reader such that it blows up if the Date header has a trailing space and you call Message.getSentDate().

The problem is in MailDateFormat.parse....

      if (end != len)
         {
           // Timezone
           start = skipWhitespace(text, end + 1);
           end = start + 1;

If it gets to this point it assumes I guess that there must be a timezone if there is trailing whitespace. So it calls skipWhitespace, the trouble is skipWhitespace doesn't check for end of String, it keeps calling charAt(pos) until it runs off the end of the String.

Is there someone more familiar with the code who would care to fix this?

I've updated the code to handle trailing whitespace, if you have any problems as a result of the changes please let me know.
--
Chris Burdess





reply via email to

[Prev in Thread] Current Thread [Next in Thread]