提交 aff987a7 编写于 作者: J jnimeh

8219775: Certificate validation improvements

Reviewed-by: ascarpino, ssahoo, skoivu
上级 ddd4bb09
...@@ -92,6 +92,7 @@ class DerIndefLenConverter { ...@@ -92,6 +92,7 @@ class DerIndefLenConverter {
private void parseTag() throws IOException { private void parseTag() throws IOException {
if (dataPos == dataSize) if (dataPos == dataSize)
return; return;
try {
if (isEOC(data[dataPos]) && (data[dataPos + 1] == 0)) { if (isEOC(data[dataPos]) && (data[dataPos + 1] == 0)) {
int numOfEncapsulatedLenBytes = 0; int numOfEncapsulatedLenBytes = 0;
Object elem = null; Object elem = null;
...@@ -123,6 +124,9 @@ class DerIndefLenConverter { ...@@ -123,6 +124,9 @@ class DerIndefLenConverter {
numOfTotalLenBytes += (sectionLenBytes.length - 3); numOfTotalLenBytes += (sectionLenBytes.length - 3);
} }
dataPos++; dataPos++;
} catch (IndexOutOfBoundsException iobe) {
throw new IOException(iobe);
}
} }
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册