On Sun, 7 Dec 2025 02:48:13 GMT, Weijun Wang <[email protected]> wrote:

>> Hai-May Chao has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Updates with Weijun's comments(encapsulate/decapsulate len checks)
>
> src/java.base/share/classes/sun/security/ssl/Hybrid.java line 336:
> 
>> 334:             int actualEncSize = leftEnc.length + rightEnc.length;
>> 335: 
>> 336:             if (actualEncSize != expectedEncSize) {
> 
> We probably don't need this check. `left` and `right` are generated inside 
> this method and there is no need to worry about they have the wrong lengths.
> 
> This is not like in `engineDecapsulate` where `encapsulation` is provided by 
> the caller and we need to validate it.

Removed the extra len check.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27614#discussion_r2595895032

Reply via email to