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
This commit is contained in:
parent
5f93d0e84c
commit
33f6dd2215
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user