RFR: 8263436: Silly array comparison in GaloisCounterMode.overlapDetection
Anthony Scarpino
ascarpino at openjdk.java.net
Thu Mar 11 18:22:08 UTC 2021
On Thu, 11 Mar 2021 11:22:40 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> SonarCloud reports:
> Use "Arrays.equals(array1, array2)" or the "==" operator instead of using the "Object.equals(Object obj)" method.
>
> } else if (!src.isDirect() && !dst.isDirect()) {
> if (!src.isReadOnly()) {
> // If using the heap, check underlying byte[] address.
> if (!src.array().equals(dst.array()) ) { // <--- here
>
> Additional testing:
> - [x] Linux x86_64 fastdebug `jdk_security`
Marked as reviewed by ascarpino (Reviewer).
-------------
PR: https://git.openjdk.java.net/jdk/pull/2938
More information about the security-dev
mailing list