RFR: 8292983: ModuleReferenceImpl.computeHash ignores the algorithm for cache checks
Aleksey Shipilev
shade at openjdk.org
Fri Aug 26 14:03:20 UTC 2022
Look at implementation and figure out what happens if you do:
computeHash("SHA-1") = someHash;
computeHash("SHA-256") = ...?
The caching method should actually check the algorithms match.
Does not seem to be a problem at this point, since we seem to be only calling that methods with "SHA-256", but this is a landmine ready to fire.
Additional testing:
- [x] Linux x86_64 release, `java/lang/module` tests
-------------
Commit messages:
- Fix
Changes: https://git.openjdk.org/jdk/pull/10044/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10044&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8292983
Stats: 25 lines in 1 file changed: 16 ins; 0 del; 9 mod
Patch: https://git.openjdk.org/jdk/pull/10044.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/10044/head:pull/10044
PR: https://git.openjdk.org/jdk/pull/10044
More information about the core-libs-dev
mailing list