提交 edeba42d 编写于 作者: H hseigel

8034926: Attribute classes properly

Summary: Add check to prevent underflow
Reviewed-by: coleenp, ahgross
上级 305ac158
/* /*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -2777,6 +2777,11 @@ void ClassFileParser::parse_classfile_bootstrap_methods_attribute(u4 attribute_b ...@@ -2777,6 +2777,11 @@ void ClassFileParser::parse_classfile_bootstrap_methods_attribute(u4 attribute_b
"Short length on BootstrapMethods in class file %s", "Short length on BootstrapMethods in class file %s",
CHECK); CHECK);
guarantee_property(attribute_byte_length > sizeof(u2),
"Invalid BootstrapMethods attribute length %u in class file %s",
attribute_byte_length,
CHECK);
// The attribute contains a counted array of counted tuples of shorts, // The attribute contains a counted array of counted tuples of shorts,
// represending bootstrap specifiers: // represending bootstrap specifiers:
// length*{bootstrap_method_index, argument_count*{argument_index}} // length*{bootstrap_method_index, argument_count*{argument_index}}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册