hotspot/src/share/vm/compiler/compileBroker.hpp
changeset 30281 b1608535e50f
parent 27701 c6b49b72dc61
child 31981 9caa094a485f
--- a/hotspot/src/share/vm/compiler/compileBroker.hpp	Tue Apr 21 10:23:13 2015 +0200
+++ b/hotspot/src/share/vm/compiler/compileBroker.hpp	Tue Apr 07 14:19:03 2015 +0200
@@ -172,7 +172,8 @@
     // these methods should be called in a thread safe context
 
     void set_current_method(const char* method) {
-      strncpy(_current_method, method, (size_t)cmname_buffer_length);
+      strncpy(_current_method, method, (size_t)cmname_buffer_length-1);
+      _current_method[cmname_buffer_length-1] = '\0';
       if (UsePerfData) _perf_current_method->set_value(method);
     }