src/share/vm/compiler/compileBroker.cpp

changeset 6755
5656140324ed
parent 6099
78da3894b86f
child 6779
364b73402247
     1.1 --- a/src/share/vm/compiler/compileBroker.cpp	Wed Feb 12 11:33:30 2014 -0800
     1.2 +++ b/src/share/vm/compiler/compileBroker.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 @@ -2089,6 +2089,7 @@
    1.11    ResourceMark rm;
    1.12    char* method_name = method->name()->as_C_string();
    1.13    strncpy(_last_method_compiled, method_name, CompileBroker::name_buffer_length);
    1.14 +  _last_method_compiled[CompileBroker::name_buffer_length - 1] = '\0'; // ensure null terminated
    1.15    char current_method[CompilerCounters::cmname_buffer_length];
    1.16    size_t maxLen = CompilerCounters::cmname_buffer_length;
    1.17  

mercurial