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
@ -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…
x
Reference in New Issue
Block a user