mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8011896: Add check for invalid offset for new AccessControlContext isAuthorized field
Reviewed-by: acorn
This commit is contained in:
parent
6ebc920e1e
commit
1fc6a72e9d
1 changed files with 4 additions and 2 deletions
|
@ -2819,8 +2819,10 @@ oop java_security_AccessControlContext::create(objArrayHandle context, bool isPr
|
|||
result->obj_field_put(_context_offset, context());
|
||||
result->obj_field_put(_privilegedContext_offset, privileged_context());
|
||||
result->bool_field_put(_isPrivileged_offset, isPrivileged);
|
||||
// whitelist AccessControlContexts created by the JVM.
|
||||
result->bool_field_put(_isAuthorized_offset, true);
|
||||
// whitelist AccessControlContexts created by the JVM if present
|
||||
if (_isAuthorized_offset != -1) {
|
||||
result->bool_field_put(_isAuthorized_offset, true);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue