Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
9e652588
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
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看板
提交
9e652588
编写于
4月 07, 2017
作者:
P
prr
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8171262: Stability fixes for lcms
Reviewed-by: serb, vadim, mschoene
上级
b0de6e35
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
29 addition
and
10 deletion
+29
-10
src/share/native/sun/java2d/cmm/lcms/cmscgats.c
src/share/native/sun/java2d/cmm/lcms/cmscgats.c
+9
-5
src/share/native/sun/java2d/cmm/lcms/cmsnamed.c
src/share/native/sun/java2d/cmm/lcms/cmsnamed.c
+10
-3
src/share/native/sun/java2d/cmm/lcms/cmsopt.c
src/share/native/sun/java2d/cmm/lcms/cmsopt.c
+1
-0
src/share/native/sun/java2d/cmm/lcms/cmstypes.c
src/share/native/sun/java2d/cmm/lcms/cmstypes.c
+8
-1
src/share/native/sun/java2d/cmm/lcms/lcms2.h
src/share/native/sun/java2d/cmm/lcms/lcms2.h
+1
-1
未找到文件。
src/share/native/sun/java2d/cmm/lcms/cmscgats.c
浏览文件 @
9e652588
...
...
@@ -900,7 +900,7 @@ void InSymbol(cmsIT8* it8)
k
=
0
;
NextCh
(
it8
);
while
(
k
<
MAXSTR
&&
it8
->
ch
!=
sng
)
{
while
(
k
<
(
MAXSTR
-
1
)
&&
it8
->
ch
!=
sng
)
{
if
(
it8
->
ch
==
'\n'
||
it8
->
ch
==
'\r'
)
k
=
MAXSTR
+
1
;
else
{
...
...
@@ -2053,14 +2053,18 @@ cmsBool HeaderSection(cmsIT8* it8)
static
void
ReadType
(
cmsIT8
*
it8
,
char
*
SheetTypePtr
)
{
cmsInt32Number
cnt
=
0
;
// First line is a very special case.
while
(
isseparator
(
it8
->
ch
))
NextCh
(
it8
);
while
(
it8
->
ch
!=
'\r'
&&
it8
->
ch
!=
'\n'
&&
it8
->
ch
!=
'\t'
&&
it8
->
ch
!=
-
1
)
{
while
(
it8
->
ch
!=
'\r'
&&
it8
->
ch
!=
'\n'
&&
it8
->
ch
!=
'\t'
&&
it8
->
ch
!=
0
)
{
*
SheetTypePtr
++=
(
char
)
it8
->
ch
;
if
(
cnt
++
<
MAXSTR
)
*
SheetTypePtr
++=
(
char
)
it8
->
ch
;
NextCh
(
it8
);
}
...
...
@@ -2253,7 +2257,7 @@ void CookPointers(cmsIT8* it8)
// that should be something like some printable characters plus a \n
// returns 0 if this is not like a CGATS, or an integer otherwise. This integer is the number of words in first line?
static
int
IsMyBlock
(
cmsUInt8Number
*
Buffer
,
int
n
)
int
IsMyBlock
(
c
onst
c
msUInt8Number
*
Buffer
,
int
n
)
{
int
words
=
1
,
space
=
0
,
quot
=
0
;
int
i
;
...
...
@@ -2317,7 +2321,7 @@ cmsBool IsMyFile(const char* FileName)
// ---------------------------------------------------------- Exported routines
cmsHANDLE
CMSEXPORT
cmsIT8LoadFromMem
(
cmsContext
ContextID
,
void
*
Ptr
,
cmsUInt32Number
len
)
cmsHANDLE
CMSEXPORT
cmsIT8LoadFromMem
(
cmsContext
ContextID
,
const
void
*
Ptr
,
cmsUInt32Number
len
)
{
cmsHANDLE
hIT8
;
cmsIT8
*
it8
;
...
...
@@ -2326,7 +2330,7 @@ cmsHANDLE CMSEXPORT cmsIT8LoadFromMem(cmsContext ContextID, void *Ptr, cmsUInt3
_cmsAssert
(
Ptr
!=
NULL
);
_cmsAssert
(
len
!=
0
);
type
=
IsMyBlock
((
cmsUInt8Number
*
)
Ptr
,
len
);
type
=
IsMyBlock
((
c
onst
c
msUInt8Number
*
)
Ptr
,
len
);
if
(
type
==
0
)
return
NULL
;
hIT8
=
cmsIT8Alloc
(
ContextID
);
...
...
src/share/native/sun/java2d/cmm/lcms/cmsnamed.c
浏览文件 @
9e652588
...
...
@@ -521,7 +521,11 @@ cmsBool GrowNamedColorList(cmsNAMEDCOLORLIST* v)
size
=
v
->
Allocated
*
2
;
// Keep a maximum color lists can grow, 100K entries seems reasonable
if
(
size
>
1024
*
100
)
return
FALSE
;
if
(
size
>
1024
*
100
)
{
_cmsFree
(
v
->
ContextID
,
(
void
*
)
v
->
List
);
v
->
List
=
NULL
;
return
FALSE
;
}
NewPtr
=
(
_cmsNAMEDCOLOR
*
)
_cmsRealloc
(
v
->
ContextID
,
v
->
List
,
size
*
sizeof
(
_cmsNAMEDCOLOR
));
if
(
NewPtr
==
NULL
)
...
...
@@ -543,8 +547,11 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
v
->
nColors
=
0
;
v
->
ContextID
=
ContextID
;
while
(
v
->
Allocated
<
n
){
if
(
!
GrowNamedColorList
(
v
))
return
NULL
;
while
(
v
->
Allocated
<
n
)
{
if
(
!
GrowNamedColorList
(
v
))
{
_cmsFree
(
ContextID
,
(
void
*
)
v
);
return
NULL
;
}
}
strncpy
(
v
->
Prefix
,
Prefix
,
sizeof
(
v
->
Prefix
)
-
1
);
...
...
src/share/native/sun/java2d/cmm/lcms/cmsopt.c
浏览文件 @
9e652588
...
...
@@ -1464,6 +1464,7 @@ cmsBool OptimizeByJoiningCurves(cmsPipeline** Lut, cmsUInt32Number Intent, cmsUI
// LUT optimizes to nothing. Set the identity LUT
cmsStageFree
(
ObtainedCurves
);
ObtainedCurves
=
NULL
;
if
(
!
cmsPipelineInsertStage
(
Dest
,
cmsAT_BEGIN
,
cmsStageAllocIdentity
(
Dest
->
ContextID
,
Src
->
InputChannels
)))
goto
Error
;
...
...
src/share/native/sun/java2d/cmm/lcms/cmstypes.c
浏览文件 @
9e652588
...
...
@@ -4452,7 +4452,8 @@ void *Type_MPE_Read(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cmsU
NewLUT
=
cmsPipelineAlloc
(
self
->
ContextID
,
InputChans
,
OutputChans
);
if
(
NewLUT
==
NULL
)
return
NULL
;
if
(
!
_cmsReadUInt32Number
(
io
,
&
ElementCount
))
return
NULL
;
if
(
!
_cmsReadUInt32Number
(
io
,
&
ElementCount
))
goto
Error
;
if
(
!
ReadPositionTable
(
self
,
io
,
ElementCount
,
BaseOffset
,
NewLUT
,
ReadMPEElem
))
goto
Error
;
if
(
!
ReadPositionTable
(
self
,
io
,
ElementCount
,
BaseOffset
,
NewLUT
,
ReadMPEElem
))
{
if
(
NewLUT
!=
NULL
)
cmsPipelineFree
(
NewLUT
);
...
...
@@ -4464,6 +4465,12 @@ void *Type_MPE_Read(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cmsU
*
nItems
=
1
;
return
NewLUT
;
// Error
Error:
if
(
NewLUT
!=
NULL
)
cmsPipelineFree
(
NewLUT
);
*
nItems
=
0
;
return
NULL
;
cmsUNUSED_PARAMETER
(
SizeOfTag
);
}
...
...
src/share/native/sun/java2d/cmm/lcms/lcms2.h
浏览文件 @
9e652588
...
...
@@ -1822,7 +1822,7 @@ CMSAPI cmsInt32Number CMSEXPORT cmsIT8SetTable(cmsHANDLE hIT8, cmsUInt32Number
// Persistence
CMSAPI
cmsHANDLE
CMSEXPORT
cmsIT8LoadFromFile
(
cmsContext
ContextID
,
const
char
*
cFileName
);
CMSAPI
cmsHANDLE
CMSEXPORT
cmsIT8LoadFromMem
(
cmsContext
ContextID
,
void
*
Ptr
,
cmsUInt32Number
len
);
CMSAPI
cmsHANDLE
CMSEXPORT
cmsIT8LoadFromMem
(
cmsContext
ContextID
,
const
void
*
Ptr
,
cmsUInt32Number
len
);
// CMSAPI cmsHANDLE CMSEXPORT cmsIT8LoadFromIOhandler(cmsContext ContextID, cmsIOHANDLER* io);
CMSAPI
cmsBool
CMSEXPORT
cmsIT8SaveToFile
(
cmsHANDLE
hIT8
,
const
char
*
cFileName
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录