> The attribute_length of known ModuleXXXX attributes in the module-info.class > is currently ignored. It should be checked and the class rejected if the > attribute length doesn't exactly match the length of the info in the > attribute. > > There are several ways to fix this. I initially limited the reading of the > attribute_info to the attribute length but this resulted in confusing > exception messages as the attribute appears truncated. The exception messages > are clearer when it checks that the attribute length corresponds to the > number of bytes read.
Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 11 additional commits since the last revision: - Restructure check to make it more obvious that it doesn't overflow - Merge - Merge - Merge - Trailing whitespace - Expand test to Module attribute - Merge - Test cleanup - Add test - Merge - ... and 1 more: https://git.openjdk.java.net/jdk/compare/1586643c...f15dbb1b ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/1407/files - new: https://git.openjdk.java.net/jdk/pull/1407/files/600db8cf..f15dbb1b Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1407&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1407&range=00-01 Stats: 4917 lines in 168 files changed: 4255 ins; 240 del; 422 mod Patch: https://git.openjdk.java.net/jdk/pull/1407.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1407/head:pull/1407 PR: https://git.openjdk.java.net/jdk/pull/1407
