farkhalit opened a new pull request, #436: URL: https://github.com/apache/commons-cli/pull/436
The Character type converter reads a \uXXXX escape straight from an argv value, and the non-BMP guard added in #425 still lets an unpaired UTF-16 surrogate (U+D800 to U+DFFF) through because isBmpCodePoint is true for surrogates, so \uD800 casts to an ill-formed char instead of being rejected the way an astral code point is. Add an isSurrogate check right after the BMP check so the converter throws for a lone surrogate too. Test cases for \uD800 and \uDFFF fail on master and pass with the fix. -- 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]
