提交 326ac239 编写于 作者: D drchase

8006807: C2 crash due to out of bounds array access in Parse::do_multianewarray

Summary: check ndimensions before accessing length[i] element
Reviewed-by: kvn
Contributed-by: volker.simonis@gmail.com
上级 3a939df8
/*
* Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2013, 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
......@@ -487,7 +487,8 @@ void Parse::do_multianewarray() {
fun, NULL, TypeRawPtr::BOTTOM,
makecon(TypeKlassPtr::make(array_klass)),
length[0], length[1], length[2],
length[3], length[4]);
(ndimensions > 2) ? length[3] : NULL,
(ndimensions > 3) ? length[4] : NULL);
} else {
// Create a java array for dimension sizes
Node* dims = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册