diff src/os/linux/vm/os_linux.cpp @ 18007:364b73402247

Merge
author asaha
date Thu, 22 May 2014 11:09:06 -0700
parents 6048424d3865 5656140324ed
children f73af4455d7d
line wrap: on
line diff
--- a/src/os/linux/vm/os_linux.cpp	Tue May 13 23:17:52 2014 -0700
+++ b/src/os/linux/vm/os_linux.cpp	Thu May 22 11:09:06 2014 -0700
@@ -1548,9 +1548,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
@@ -2339,6 +2336,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)) {
@@ -2359,7 +2357,7 @@
     }
   }
 
-  strcpy(saved_jvm_path, buf);
+  strncpy(saved_jvm_path, buf, MAXPATHLEN);
 }
 
 void os::print_jni_name_prefix_on(outputStream* st, int args_size) {