src/os/bsd/vm/os_bsd.cpp

changeset 6755
5656140324ed
parent 6054
3b32d287da89
child 6779
364b73402247
     1.1 --- a/src/os/bsd/vm/os_bsd.cpp	Wed Feb 12 11:33:30 2014 -0800
     1.2 +++ b/src/os/bsd/vm/os_bsd.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 @@ -1115,10 +1115,6 @@
    1.11    ::abort();
    1.12  }
    1.13  
    1.14 -// unused on bsd 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  
    1.21 @@ -1808,6 +1804,7 @@
    1.22          // determine if this is a legacy image or modules image
    1.23          // modules image doesn't have "jre" subdirectory
    1.24          len = strlen(buf);
    1.25 +        assert(len < buflen, "Ran out of buffer space");
    1.26          jrelib_p = buf + len;
    1.27  
    1.28          // Add the appropriate library subdir
    1.29 @@ -1841,7 +1838,7 @@
    1.30      }
    1.31    }
    1.32  
    1.33 -  strcpy(saved_jvm_path, buf);
    1.34 +  strncpy(saved_jvm_path, buf, MAXPATHLEN);
    1.35  }
    1.36  
    1.37  void os::print_jni_name_prefix_on(outputStream* st, int args_size) {

mercurial