Mercurial > hg > truffle
diff src/os/solaris/vm/os_solaris.cpp @ 9059:17bf4d428955
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
author | ccheung |
---|---|
date | Wed, 03 Apr 2013 16:43:09 -0700 |
parents | 15401203db6b |
children | cc32ccaaf47f |
line wrap: on
line diff
--- a/src/os/solaris/vm/os_solaris.cpp Fri Mar 29 14:18:40 2013 -0700 +++ b/src/os/solaris/vm/os_solaris.cpp Wed Apr 03 16:43:09 2013 -0700 @@ -1903,6 +1903,9 @@ } 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) {