<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<div>
<div id="x_compose-container" itemscope="" itemtype="https://schema.org/EmailMessage" style="direction:ltr">
<span itemprop="creator" itemscope="" itemtype="https://schema.org/Organization"><span itemprop="name"></span></span>
<div>
<div style="direction:ltr">
<div style="direction:ltr">BTW: Can in.available() be < length as well? In that case then exception before your changed line would be misleading.</div>
<div><br>
</div>
<div style="direction:ltr">Gruss</div>
<div style="direction:ltr">Bernd</div>
</div>
<div><br>
</div>
<div class="x_acompli_signature">Gruss<br>
Bernd<br>
-- <br>
<a dir="ltr" href="http://bernd.eckenfels.net">http://bernd.eckenfels.net</a></div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> security-dev <security-dev-bounces@openjdk.java.net> on behalf of Adam Petcher <adam.petcher@oracle.com><br>
<b>Sent:</b> Wednesday, July 12, 2017 8:38:25 PM<br>
<b>To:</b> security-dev@openjdk.java.net<br>
<b>Subject:</b> RFR 8183591: Incorrect behavior when reading DER value with Integer.MAX_VALUE length</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">This is a bug fix for a corner case in which a DER value has length
<br>
equal to Integer.MAX_VALUE. The code uses IOUtils.readFully() to read <br>
the value, which interprets length=Integer.MAX_VALUE to mean "read to <br>
the end." The result is that no exception will be thrown when fewer then <br>
Integer.MAX_VALUE bytes are read from the stream. The fix adds a check <br>
after the readFully() to ensure that the expected number of bytes were <br>
read.<br>
<br>
Webrev: <a href="http://cr.openjdk.java.net/~apetcher/8183591/webrev.00/">http://cr.openjdk.java.net/~apetcher/8183591/webrev.00/</a><br>
JBS: <a href="https://bugs.openjdk.java.net/browse/JDK-8183591">https://bugs.openjdk.java.net/browse/JDK-8183591</a><br>
<br>
</div>
</span></font>
</body>
</html>