[PR] reject negative UTF length in LongUTFDataInputStream.re adLongUTF [poi-xmlbeans]

aizu-m (via GitHub) <[email protected]>
Newsgroups gmane.comp.jakarta.poi.devel
Message-ID <[email protected]>
aizu-m opened a new pull request, #93:
URL: https://github.com/apache/poi-xmlbeans/pull/93

   readUnsignedShortOrInt falls back to a signed readInt for the 0xfffe marker so the modified-UTF length can arrive negative, and it flows straight into new StringBuilder(utfLen/2) which throws NegativeArraySizeException out of StringPool.readFrom and crackPointer (both catch only IOException) instead of the SchemaTypeLoaderException the loader is contracted to use; rejecting a negative length as a UTFDataFormatException matches the malformed cases already handled in this method and lets the existing IOException catch wrap it.


-- 
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]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.