mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8302337: JDK crashes if lib/modules contains non-zero byte containing ATTRIBUTE_END
Reviewed-by: stuefe, jlaskey, alanb
This commit is contained in:
parent
7f71a1040d
commit
ee5f6e156d
1 changed files with 3 additions and 0 deletions
|
@ -130,6 +130,9 @@ void ImageLocation::set_data(u1* data) {
|
||||||
// Extract kind from header byte.
|
// Extract kind from header byte.
|
||||||
u1 kind = attribute_kind(byte);
|
u1 kind = attribute_kind(byte);
|
||||||
assert(kind < ATTRIBUTE_COUNT && "invalid image location attribute");
|
assert(kind < ATTRIBUTE_COUNT && "invalid image location attribute");
|
||||||
|
if (kind == ATTRIBUTE_END) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
// Extract length of data (in bytes).
|
// Extract length of data (in bytes).
|
||||||
u1 n = attribute_length(byte);
|
u1 n = attribute_length(byte);
|
||||||
// Read value (most significant first.)
|
// Read value (most significant first.)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue