Mercurial > hg > release > icedtea7-forest-2.4 > hotspot
changeset 5111:aadc864abd1c jdk7u55-b12
8034926: Attribute classes properly
Summary: Add check to prevent underflow
Reviewed-by: coleenp, ahgross
author | hseigel |
---|---|
date | Thu, 20 Feb 2014 13:51:45 -0500 |
parents | 8cc154e4a3d6 |
children | b021fd817a01 |
files | src/share/vm/classfile/classFileParser.cpp |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/classfile/classFileParser.cpp Fri Feb 28 02:45:17 2014 -0800 +++ b/src/share/vm/classfile/classFileParser.cpp Thu Feb 20 13:51:45 2014 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, 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. * * This code is free software; you can redistribute it and/or modify it @@ -2661,6 +2661,11 @@ "Short length on BootstrapMethods in class file %s", 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, // represending bootstrap specifiers: // length*{bootstrap_method_index, argument_count*{argument_index}}