--- a/jdk/src/share/classes/java/security/Signature.java Wed Jun 06 18:18:58 2012 -0700
+++ b/jdk/src/share/classes/java/security/Signature.java Wed Jun 06 18:39:09 2012 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2012, 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
@@ -658,7 +658,7 @@
throws SignatureException {
if (state == VERIFY) {
if ((signature == null) || (offset < 0) || (length < 0) ||
- (offset + length > signature.length)) {
+ (length > signature.length - offset)) {
throw new IllegalArgumentException("Bad arguments");
}