Mercurial > hg > truffle
diff src/os/linux/vm/os_linux.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 | 14509df4cd63 |
children | cc32ccaaf47f |
line wrap: on
line diff
--- a/src/os/linux/vm/os_linux.cpp Fri Mar 29 14:18:40 2013 -0700 +++ b/src/os/linux/vm/os_linux.cpp Wed Apr 03 16:43:09 2013 -0700 @@ -1647,6 +1647,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 check can't hurt if (pelements[i] == NULL || strlen(pelements[i]) == 0) {