google / google/conscrypt

ConscryptEngine.calcDstsLength ignoring dstsLength

Open
#1,372 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.4k
Forks
326
Avg merge
16h 22m
Merged PRs (30d)
17

Description

Using [unwrap](https://github.com/google/conscrypt/blob/master/common/src/main/java/org/conscrypt/ConscryptEngine.java#L728) with an array of destination buffers, offset and length is broken due to the [calcDstsLength](https://github.com/google/conscrypt/blob/master/common/src/main/java/org/conscrypt/ConscryptEngine.java#L938) method ignoring its length argument and instead using the array length, thus incorrectly failing non-null check on array element it should ignore.

Workaround until fixed is to fill the array elements beyond the length argument with empty buffers.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.