8204196: integer cleanup

Reviewed-by: xuelei
This commit is contained in:
Anthony Scarpino 2018-07-20 09:55:15 -07:00
parent f53e04ead9
commit 4e46cc1392
7 changed files with 18 additions and 12 deletions

View file

@ -507,6 +507,10 @@ final class P11Signature extends SignatureSpi {
if (len == 0) {
return;
}
// check for overflow
if (len + bytesProcessed < 0) {
throw new ProviderException("Processed bytes limits exceeded.");
}
switch (type) {
case T_UPDATE:
try {