geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickmcgu...@apache.org
Subject svn commit: r688710 - in /geronimo/specs/trunk/geronimo-javamail_1.4_spec: pom.xml src/main/java/javax/mail/internet/InternetHeaders.java
Date Mon, 25 Aug 2008 12:53:14 GMT
Author: rickmcguire
Date: Mon Aug 25 05:53:14 2008
New Revision: 688710

URL: http://svn.apache.org/viewvc?rev=688710&view=rev
Log:
GERONIMO-4261 MimeMessage throws IndexOutOfBoundsException on malformed data


Modified:
    geronimo/specs/trunk/geronimo-javamail_1.4_spec/pom.xml
    geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/InternetHeaders.java

Modified: geronimo/specs/trunk/geronimo-javamail_1.4_spec/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-javamail_1.4_spec/pom.xml?rev=688710&r1=688709&r2=688710&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-javamail_1.4_spec/pom.xml (original)
+++ geronimo/specs/trunk/geronimo-javamail_1.4_spec/pom.xml Mon Aug 25 05:53:14 2008
@@ -47,9 +47,8 @@
 
     <properties>
         <siteId>specs/${artifactId}</siteId>
-        <geronimo.osgi.export.pkg>javax.mail*</geronimo.osgi.export.pkg>
-        <geronimo.osgi.private.pkg>org.apache.geronimo.mail*</geronimo.osgi.private.pkg>
-        <geronimo.osgi.export.version>1.4</geronimo.osgi.export.version>
+        <geronimo.osgi.export.pkg>javax.mail*,org.apache.geronimo.mail*</geronimo.osgi.export.pkg>
+        <geronimo.osgi.export.version>1.5-SNAPSHOT</geronimo.osgi.export.version>
         <geronimo.osgi.resources>src/main/resources/,META-INF/LICENSE.txt=LICENSE.txt,META-INF/NOTICE.txt=NOTICE.txt</geronimo.osgi.resources>
     </properties>
 

Modified: geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/InternetHeaders.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/InternetHeaders.java?rev=688710&r1=688709&r2=688710&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/InternetHeaders.java
(original)
+++ geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/InternetHeaders.java
Mon Aug 25 05:53:14 2008
@@ -535,8 +535,12 @@
 
         // tabs and spaces are special.  This is a continuation of the last header in the
list.
         if (ch == ' ' || ch == '\t') {
-            InternetHeader header = (InternetHeader)headers.get(headers.size() - 1);
-            header.appendValue(line);
+            int size = headers.size(); 
+            // it's possible that we have a leading blank line. 
+            if (size > 0) {
+                InternetHeader header = (InternetHeader)headers.get(size - 1);
+                header.appendValue(line);
+            }
         }
         else {
             // this just gets appended to the end, preserving the addition order.



Mime
View raw message