1.1 --- a/src/os/linux/vm/os_linux.cpp Wed Feb 12 11:33:30 2014 -0800 1.2 +++ b/src/os/linux/vm/os_linux.cpp Thu Feb 13 11:28:17 2014 -0500 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -1572,9 +1572,6 @@ 1.11 ::abort(); 1.12 } 1.13 1.14 -// unused on linux for now. 1.15 -void os::set_error_file(const char *logfile) {} 1.16 - 1.17 1.18 // This method is a copy of JDK's sysGetLastErrorString 1.19 // from src/solaris/hpi/src/system_md.c 1.20 @@ -2399,6 +2396,7 @@ 1.21 // determine if this is a legacy image or modules image 1.22 // modules image doesn't have "jre" subdirectory 1.23 len = strlen(buf); 1.24 + assert(len < buflen, "Ran out of buffer room"); 1.25 jrelib_p = buf + len; 1.26 snprintf(jrelib_p, buflen-len, "/jre/lib/%s", cpu_arch); 1.27 if (0 != access(buf, F_OK)) { 1.28 @@ -2419,7 +2417,7 @@ 1.29 } 1.30 } 1.31 1.32 - strcpy(saved_jvm_path, buf); 1.33 + strncpy(saved_jvm_path, buf, MAXPATHLEN); 1.34 } 1.35 1.36 void os::print_jni_name_prefix_on(outputStream* st, int args_size) {