naruto-lgtm opened a new pull request, #1392:
URL: https://github.com/apache/poi/pull/1392

   Repro: call NameIdChunks.getPropertyTag on a .msg whose entry stream holds a 
string named property with a StringOffset in the last three bytes of the string 
stream, or at 0x80000000 and above.
   Cause: getStreamID narrows the unsigned 32-bit StringOffset to int and only 
checks stringBytes.length > nameOffset, so the 4-byte name length read indexes 
past the end of the stream, and a high offset goes negative and indexes before 
it, surfacing ArrayIndexOutOfBoundsException from the lookup API.
   Fix: keep the offset as a long and require room for the length field before 
reading, so unresolvable entries return 0 like other entries that fail to match.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to