提交 2f15bbb0 编写于 作者: I igerasim

8203654: Improve cypher state updates

Reviewed-by: ascarpino
上级 0a8d223a
......@@ -2703,7 +2703,7 @@ public class Cipher {
// Input sanity check
if ((src == null) || (offset < 0) || (len < 0)
|| ((len + offset) > src.length)) {
|| (len > (src.length - offset))) {
throw new IllegalArgumentException("Bad arguments");
}
......
/*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2018, 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
......@@ -120,7 +120,7 @@ public class GCMParameterSpec implements AlgorithmParameterSpec {
// Input sanity check
if ((src == null) ||(len < 0) || (offset < 0)
|| ((len + offset) > src.length)) {
|| (len > (src.length - offset))) {
throw new IllegalArgumentException("Invalid buffer arguments");
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册