Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
a35baaf9
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
3
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a35baaf9
编写于
8月 28, 2017
作者:
C
coffeys
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8159035: CTSMode.java test crashed due to unhandled case of cipher length value as 0
Reviewed-by: ascarpino
上级
f674bbaf
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
16 addition
and
5 deletion
+16
-5
src/share/classes/com/sun/crypto/provider/CipherBlockChaining.java
.../classes/com/sun/crypto/provider/CipherBlockChaining.java
+7
-1
src/share/classes/com/sun/crypto/provider/CounterMode.java
src/share/classes/com/sun/crypto/provider/CounterMode.java
+4
-1
src/share/classes/sun/nio/cs/ISO_8859_1.java
src/share/classes/sun/nio/cs/ISO_8859_1.java
+5
-3
未找到文件。
src/share/classes/com/sun/crypto/provider/CipherBlockChaining.java
浏览文件 @
a35baaf9
/*
* Copyright (c) 1997, 201
4
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
7
, 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
...
...
@@ -140,6 +140,9 @@ class CipherBlockChaining extends FeedbackCipher {
int
encrypt
(
byte
[]
plain
,
int
plainOffset
,
int
plainLen
,
byte
[]
cipher
,
int
cipherOffset
)
{
if
(
plainLen
<=
0
)
{
return
plainLen
;
}
if
((
plainLen
%
blockSize
)
!=
0
)
{
throw
new
ProviderException
(
"Internal error in input buffering"
);
}
...
...
@@ -181,6 +184,9 @@ class CipherBlockChaining extends FeedbackCipher {
int
decrypt
(
byte
[]
cipher
,
int
cipherOffset
,
int
cipherLen
,
byte
[]
plain
,
int
plainOffset
)
{
if
(
cipherLen
<=
0
)
{
return
cipherLen
;
}
if
((
cipherLen
%
blockSize
)
!=
0
)
{
throw
new
ProviderException
(
"Internal error in input buffering"
);
}
...
...
src/share/classes/com/sun/crypto/provider/CounterMode.java
浏览文件 @
a35baaf9
/*
* Copyright (c) 2002, 201
4
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 201
7
, 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
...
...
@@ -170,6 +170,9 @@ final class CounterMode extends FeedbackCipher {
* are encrypted on demand.
*/
private
int
crypt
(
byte
[]
in
,
int
inOff
,
int
len
,
byte
[]
out
,
int
outOff
)
{
if
(
len
==
0
)
{
return
0
;
}
int
result
=
len
;
while
(
len
--
>
0
)
{
if
(
used
>=
blockSize
)
{
...
...
src/share/classes/sun/nio/cs/ISO_8859_1.java
浏览文件 @
a35baaf9
/*
* Copyright (c) 2000, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 201
7
, 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
...
...
@@ -148,6 +148,7 @@ class ISO_8859_1
private
final
Surrogate
.
Parser
sgp
=
new
Surrogate
.
Parser
();
// JVM may replace this method with intrinsic code.
// don't pass len value <= 0
private
static
int
encodeISOArray
(
char
[]
sa
,
int
sp
,
byte
[]
da
,
int
dp
,
int
len
)
{
...
...
@@ -180,7 +181,7 @@ class ISO_8859_1
int
slen
=
sl
-
sp
;
int
len
=
(
dlen
<
slen
)
?
dlen
:
slen
;
try
{
int
ret
=
encodeISOArray
(
sa
,
sp
,
da
,
dp
,
len
);
int
ret
=
(
len
<=
0
)
?
0
:
encodeISOArray
(
sa
,
sp
,
da
,
dp
,
len
);
sp
=
sp
+
ret
;
dp
=
dp
+
ret
;
if
(
ret
!=
len
)
{
...
...
@@ -240,7 +241,8 @@ class ISO_8859_1
int
slen
=
Math
.
min
(
len
,
dst
.
length
);
int
sl
=
sp
+
slen
;
while
(
sp
<
sl
)
{
int
ret
=
encodeISOArray
(
src
,
sp
,
dst
,
dp
,
slen
);
int
ret
=
(
slen
<=
0
)
?
0
:
encodeISOArray
(
src
,
sp
,
dst
,
dp
,
slen
);
sp
=
sp
+
ret
;
dp
=
dp
+
ret
;
if
(
ret
!=
slen
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录