Mercurial > hg > graal-jvmci-8
diff src/os/linux/vm/os_linux.cpp @ 20204:d22136881b85
Merge
author | robm |
---|---|
date | Thu, 17 Jul 2014 18:03:26 +0100 |
parents | ce8f6bb717c9 f73af4455d7d |
children | 833b0f92429a |
line wrap: on
line diff
--- a/src/os/linux/vm/os_linux.cpp Wed Jul 16 16:45:17 2014 -0700 +++ b/src/os/linux/vm/os_linux.cpp Thu Jul 17 18:03:26 2014 +0100 @@ -1551,9 +1551,6 @@ ::abort(); } -// unused on linux for now. -void os::set_error_file(const char *logfile) {} - // This method is a copy of JDK's sysGetLastErrorString // from src/solaris/hpi/src/system_md.c @@ -2342,6 +2339,7 @@ // determine if this is a legacy image or modules image // modules image doesn't have "jre" subdirectory len = strlen(buf); + assert(len < buflen, "Ran out of buffer room"); jrelib_p = buf + len; snprintf(jrelib_p, buflen-len, "/jre/lib/%s", cpu_arch); if (0 != access(buf, F_OK)) { @@ -2362,7 +2360,7 @@ } } - strcpy(saved_jvm_path, buf); + strncpy(saved_jvm_path, buf, MAXPATHLEN); } void os::print_jni_name_prefix_on(outputStream* st, int args_size) {