pjfanning commented on PR #396:
URL: https://github.com/apache/poi/pull/396#issuecomment-1303121496

   The code is in this PR does not work. It breaks dozens of the existing tests 
and even stops POI from being able to read the Test1.msg file.
   
   Causes exceptions like this when reading certain .msg files:
   
   ```
   org.apache.poi.util.RecordFormatException: Can't allocate an array of length 
< 0, but had -1 and 1000000
        at org.apache.poi.util.IOUtils.safelyAllocateCheck(IOUtils.java:556)
        at org.apache.poi.util.IOUtils.safelyAllocate(IOUtils.java:547)
        at 
org.apache.poi.hsmf.datatypes.PropertiesChunk.readProperties(PropertiesChunk.java:264)
        at 
org.apache.poi.hsmf.datatypes.MessagePropertiesChunk.readProperties(MessagePropertiesChunk.java:96)
        at 
org.apache.poi.hsmf.datatypes.MessagePropertiesChunk.readValue(MessagePropertiesChunk.java:101)
        at 
org.apache.poi.hsmf.parsers.POIFSChunkParser.process(POIFSChunkParser.java:150)
        at 
org.apache.poi.hsmf.parsers.POIFSChunkParser.processChunks(POIFSChunkParser.java:121)
        at 
org.apache.poi.hsmf.parsers.POIFSChunkParser.parse(POIFSChunkParser.java:99)
        at org.apache.poi.hsmf.MAPIMessage.<init>(MAPIMessage.java:172)
   ```
   
   I added some of the PR code and a test case with Test1.msg but renamed the 
file to bug66335.msg. I omitted the changes to PropertiesChunk.java because 
those are the changes that break the code. 
https://github.com/apache/poi/commit/c4a0266cb38c7f98f3efc74be805c4028b0518e8
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to