RFR: 8275811 Incorrect instance to dispose [v5]

Daniel Jeliński duke at openjdk.java.net
Wed Nov 3 09:16:50 UTC 2021


On Tue, 2 Nov 2021 23:43:42 GMT, Xue-Lei Andrew Fan <xuelei at openjdk.org> wrote:

>> Daniel Jeliński has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   avoid modifying DTLSOutputRecord
>
> src/java.base/share/classes/sun/security/ssl/SSLEngineOutputRecord.java line 436:
> 
>> 434: 
>> 435:         void queueUpCipherDispose() {
>> 436:             RecordMemo lastMemo = handshakeMemos.getLast();
> 
> Sorry, I missed that the getLast could throw exception if it is empty.  I may check it before the call to getLast.
> 
> +           if (handshakeMemos.isEmpty()) {
> +              return;
> +          }

my mistake. Replaced with `peekLast`, should be better now.

-------------

PR: https://git.openjdk.java.net/jdk/pull/6084



More information about the security-dev mailing list