Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
3517a050
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看板
提交
3517a050
编写于
10月 16, 2012
作者:
K
ksrini
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7200499: Better data validation for options
Reviewed-by: darcy, jjh, mschoene
上级
28604a53
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
29 addition
and
5 deletion
+29
-5
src/share/bin/jli_util.h
src/share/bin/jli_util.h
+1
-1
src/windows/bin/java_md.c
src/windows/bin/java_md.c
+28
-4
未找到文件。
src/share/bin/jli_util.h
浏览文件 @
3517a050
...
@@ -66,7 +66,7 @@ int JLI_GetStdArgc();
...
@@ -66,7 +66,7 @@ int JLI_GetStdArgc();
#include <io.h>
#include <io.h>
#define JLI_StrCaseCmp(p1, p2) stricmp((p1), (p2))
#define JLI_StrCaseCmp(p1, p2) stricmp((p1), (p2))
#define JLI_StrNCaseCmp(p1, p2, p3) strnicmp((p1), (p2), (p3))
#define JLI_StrNCaseCmp(p1, p2, p3) strnicmp((p1), (p2), (p3))
#define JLI_Snprintf _snprintf
size_t
JLI_Snprintf
(
char
*
buffer
,
size_t
size
,
const
char
*
format
,
...);
void
JLI_CmdToArgs
(
char
*
cmdline
);
void
JLI_CmdToArgs
(
char
*
cmdline
);
#define JLI_Lseek _lseeki64
#define JLI_Lseek _lseeki64
#else
/* NIXES */
#else
/* NIXES */
...
...
src/windows/bin/java_md.c
浏览文件 @
3517a050
...
@@ -101,7 +101,6 @@ int awtPreloadD3D = -1;
...
@@ -101,7 +101,6 @@ int awtPreloadD3D = -1;
/* funtion in awt.dll (src/windows/native/sun/java2d/d3d/D3DPipelineManager.cpp) */
/* funtion in awt.dll (src/windows/native/sun/java2d/d3d/D3DPipelineManager.cpp) */
#define D3D_PRELOAD_FUNC "preloadD3D"
#define D3D_PRELOAD_FUNC "preloadD3D"
/* Extracts value of a parameter with the specified name
/* Extracts value of a parameter with the specified name
* from command line argument (returns pointer in the argument).
* from command line argument (returns pointer in the argument).
* Returns NULL if the argument does not contains the parameter.
* Returns NULL if the argument does not contains the parameter.
...
@@ -276,7 +275,8 @@ LoadMSVCRT()
...
@@ -276,7 +275,8 @@ LoadMSVCRT()
#endif
#endif
#ifdef CRT_DLL
#ifdef CRT_DLL
if
(
GetJREPath
(
crtpath
,
MAXPATHLEN
))
{
if
(
GetJREPath
(
crtpath
,
MAXPATHLEN
))
{
if
(
JLI_StrLen
(
crtpath
)
+
JLI_StrLen
(
"
\\
bin
\\
"
)
+
JLI_StrLen
(
CRT_DLL
)
>=
MAXPATHLEN
)
{
if
(
JLI_StrLen
(
crtpath
)
+
JLI_StrLen
(
"
\\
bin
\\
"
)
+
JLI_StrLen
(
CRT_DLL
)
>=
MAXPATHLEN
)
{
JLI_ReportErrorMessage
(
JRE_ERROR11
);
JLI_ReportErrorMessage
(
JRE_ERROR11
);
return
JNI_FALSE
;
return
JNI_FALSE
;
}
}
...
@@ -347,7 +347,8 @@ GetJVMPath(const char *jrepath, const char *jvmtype,
...
@@ -347,7 +347,8 @@ GetJVMPath(const char *jrepath, const char *jvmtype,
if
(
JLI_StrChr
(
jvmtype
,
'/'
)
||
JLI_StrChr
(
jvmtype
,
'\\'
))
{
if
(
JLI_StrChr
(
jvmtype
,
'/'
)
||
JLI_StrChr
(
jvmtype
,
'\\'
))
{
JLI_Snprintf
(
jvmpath
,
jvmpathsize
,
"%s
\\
"
JVM_DLL
,
jvmtype
);
JLI_Snprintf
(
jvmpath
,
jvmpathsize
,
"%s
\\
"
JVM_DLL
,
jvmtype
);
}
else
{
}
else
{
JLI_Snprintf
(
jvmpath
,
jvmpathsize
,
"%s
\\
bin
\\
%s
\\
"
JVM_DLL
,
jrepath
,
jvmtype
);
JLI_Snprintf
(
jvmpath
,
jvmpathsize
,
"%s
\\
bin
\\
%s
\\
"
JVM_DLL
,
jrepath
,
jvmtype
);
}
}
if
(
stat
(
jvmpath
,
&
s
)
==
0
)
{
if
(
stat
(
jvmpath
,
&
s
)
==
0
)
{
return
JNI_TRUE
;
return
JNI_TRUE
;
...
@@ -526,6 +527,29 @@ jlong Counter2Micros(jlong counts)
...
@@ -526,6 +527,29 @@ jlong Counter2Micros(jlong counts)
return
(
counts
*
1000
*
1000
)
/
counterFrequency
.
QuadPart
;
return
(
counts
*
1000
*
1000
)
/
counterFrequency
.
QuadPart
;
}
}
/*
* windows snprintf does not guarantee a null terminator in the buffer,
* if the computed size is equal to or greater than the buffer size,
* as well as error conditions, this function guarantees a null terminator
* under all these conditions. An unreasonable buffer size will return
* an error value.
*/
size_t
JLI_Snprintf
(
char
*
buffer
,
size_t
size
,
const
char
*
format
,
...)
{
size_t
rc
;
va_list
vl
;
if
(
size
<=
0
)
return
-
1
;
va_start
(
vl
,
format
);
rc
=
vsnprintf
(
buffer
,
size
-
1
,
format
,
vl
);
/* force a null terminator, if something is amiss */
if
(
rc
<
0
||
rc
>=
size
)
buffer
[
size
-
1
]
=
'\0'
;
va_end
(
vl
);
return
rc
;
}
void
void
JLI_ReportErrorMessage
(
const
char
*
fmt
,
...)
{
JLI_ReportErrorMessage
(
const
char
*
fmt
,
...)
{
va_list
vl
;
va_list
vl
;
...
@@ -880,7 +904,7 @@ unquote(const char *s) {
...
@@ -880,7 +904,7 @@ unquote(const char *s) {
*/
*/
void
void
ExecJRE
(
char
*
jre
,
char
**
argv
)
{
ExecJRE
(
char
*
jre
,
char
**
argv
)
{
int
len
;
j
int
len
;
char
path
[
MAXPATHLEN
+
1
];
char
path
[
MAXPATHLEN
+
1
];
const
char
*
progname
=
GetProgramName
();
const
char
*
progname
=
GetProgramName
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录