Bug with MIMEHeader.getHeaderValAndParams(true, false) not handling very large recipient lists

I have a processing application which extracts metadata and text from Notes documents using the JavaMail API, and using Lotus Notes 8.5.0.

We had some customer data which had very large recipient list sizes in the SendTo field as RFC822 data. Here were some example sizes, which are just below the 32kb == 32768.

Data Length: 32736 bytes

Data Length: 32755 bytes

Data Length: 32754 bytes

Data Length: 32765 bytes

In our code, we had something like:

List<?> headers = mime.getHeaderObjects();

if (headers != null)

{

for (Object o : headers)

{

    MIMEHeader header = (MIMEHeader) o;

    String headerName = header.getHeaderName();

    String headerValue = header.getHeaderValAndParams(true, false);

    ...

}

...

}

The first parameter to getHeaderValAndParams of true (perform RFC822 folding), seems to cause the issue, which is the code gets stuck in a 100% CPU loop inside this stack-trace:

at lotus.domino.local.MIMEHeader.NgetHdrVP(Native Method)

at lotus.domino.local.MIMEHeader.getHeaderValAndParams(Unknown Source)

  • locked lotus.domino.local.MIMEHeader@1108e4

If I change the first parameter to false, then it all works fine. The problem is 100% reproduceable.

I couldn’t find an appropriate bug submission form on IBM’s web-site, so I hope this is the appropriate location.

Cheers,

David