提交 24402beb 编写于 作者: C ccheung

8006103: [parfait] Possible null pointer dereference at...

8006103: [parfait] Possible null pointer dereference at hotspot/src/os/linux/vm/os_linux.cpp; os_windows.cpp; os_solaris.cpp; os_bsd.cpp
Reviewed-by: zgu, iklam
上级 c1d68a0a
......@@ -1214,6 +1214,9 @@ bool os::dll_build_name(char* buffer, size_t buflen,
} else if (strchr(pname, *os::path_separator()) != NULL) {
int n;
char** pelements = split_path(pname, &n);
if (pelements == NULL) {
return false;
}
for (int i = 0 ; i < n ; i++) {
// Really shouldn't be NULL, but check can't hurt
if (pelements[i] == NULL || strlen(pelements[i]) == 0) {
......
......@@ -1647,6 +1647,9 @@ bool os::dll_build_name(char* buffer, size_t buflen,
} else if (strchr(pname, *os::path_separator()) != NULL) {
int n;
char** pelements = split_path(pname, &n);
if (pelements == NULL) {
return false;
}
for (int i = 0 ; i < n ; i++) {
// Really shouldn't be NULL, but check can't hurt
if (pelements[i] == NULL || strlen(pelements[i]) == 0) {
......
......@@ -1903,6 +1903,9 @@ bool os::dll_build_name(char* buffer, size_t buflen,
} else if (strchr(pname, *os::path_separator()) != NULL) {
int n;
char** pelements = split_path(pname, &n);
if (pelements == NULL) {
return false;
}
for (int i = 0 ; i < n ; i++) {
// really shouldn't be NULL but what the heck, check can't hurt
if (pelements[i] == NULL || strlen(pelements[i]) == 0) {
......
......@@ -1177,6 +1177,9 @@ bool os::dll_build_name(char *buffer, size_t buflen,
} else if (strchr(pname, *os::path_separator()) != NULL) {
int n;
char** pelements = split_path(pname, &n);
if (pelements == NULL) {
return false;
}
for (int i = 0 ; i < n ; i++) {
char* path = pelements[i];
// Really shouldn't be NULL, but check can't hurt
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册