RFR 8223174 : Pattern.compile() can throw confusing NegativeArraySizeException
ivan.gerasimov at oracle.com
Sat May 4 00:53:44 UTC 2019
A private method Pattern. RemoveQEQuoting() contains calculation of an
array size, which can result in numeric overflow, and cause a confusing
Would you please help review the fix?
Please note, that expressions `j + 2` and `pLen - i` cannot overflow
(because j is the index of a substring "\Q", and i is an index < pLen),
so they are not wrapped with exactXXX() methods.
With kind regards,
More information about the core-libs-dev