You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2015/04/15 19:18:36 UTC

[Bug 57818] New: BufferUnderrunException reading valid but difficult winmail.dat file

https://bz.apache.org/bugzilla/show_bug.cgi?id=57818

            Bug ID: 57818
           Summary: BufferUnderrunException reading valid but difficult
                    winmail.dat file
           Product: POI
           Version: 3.11-FINAL
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HMEF
          Assignee: dev@poi.apache.org
          Reporter: ryan@marix.com

While opening a winmail.dat file I get a BufferUnderrunException.  The message
is properly opened and displayed if forwarded to an outlook.com email address.  

My code is trivial:

HMEFContentsExtractor ext = new HMEFContentsExtractor(tnefFile);


I cannot include a sample file as it is confidential customer information,
however, I can privately share samples for testing, I have hundreds.


I have also tried and failed opening with these utilities:
* http://www.freeutils.net/source/jtnef/ java library
* http://tud.at/php/tnef/ online tnef extractor
* http://www.winmail-dat.com/online.php online tnef extractor
* http://github.com/verdammelt/tnef C utility on linux
* http://www.joshjacob.com/mac-development/tnef.php OSX app
* Forward to gmail.com email address

I was thinking the winmail.dat file was corrupt until I sent to outlook.com and
it worked perfectly.




Stack trace:

org.apache.poi.util.LittleEndian$BufferUnderrunException: buffer underrun 
    at org.apache.poi.util.LittleEndian.readUShort(LittleEndian.java:804) 
    at
org.apache.poi.hmef.attribute.TNEFAttribute.create(TNEFAttribute.java:61) 
    at org.apache.poi.hmef.HMEFMessage.process(HMEFMessage.java:74) 
    at org.apache.poi.hmef.HMEFMessage.process(HMEFMessage.java:98) 
    at org.apache.poi.hmef.HMEFMessage.process(HMEFMessage.java:98) 
    at org.apache.poi.hmef.HMEFMessage.process(HMEFMessage.java:98) 
    at org.apache.poi.hmef.HMEFMessage.process(HMEFMessage.java:98) 
    at org.apache.poi.hmef.HMEFMessage.process(HMEFMessage.java:98) 
    at org.apache.poi.hmef.HMEFMessage.process(HMEFMessage.java:98) 
    at org.apache.poi.hmef.HMEFMessage.process(HMEFMessage.java:98) 
    at org.apache.poi.hmef.HMEFMessage.process(HMEFMessage.java:98) 
    at org.apache.poi.hmef.HMEFMessage.<init>(HMEFMessage.java:63) 
    at
org.apache.poi.hmef.extractor.HMEFContentsExtractor.<init>(HMEFContentsExtractor.java:63) 
... my code

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 57818] BufferUnderrunException reading valid but difficult winmail.dat file

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57818

Nick Burch <ap...@gagravarr.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Nick Burch <ap...@gagravarr.org> ---
I'd suggest attaching a debugger, and stepping through. Focus on the attributes
just before it goes wrong, as well as the one it fails on - check if they look
sensible, sizes and types are sensible, values read match the ones that outlook
shows etc. That should help you identify if the problem is with the failing
attribute, or if it's actually a problem with a preceeding one which wrecks the
state

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 57818] BufferUnderrunException reading valid but difficult winmail.dat file

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57818

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |LATER
             Status|NEEDINFO                    |RESOLVED

--- Comment #2 from Dominik Stadler <do...@gmx.at> ---
Unfortunately there is not much we can do without a sample file, therefore I am
closing this for now, please reopen if you can provide a file.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org