< prev index next >

src/hotspot/share/services/diagnosticArgument.cpp

Print this page

        

@@ -149,11 +149,11 @@
        set_value(false);
     } else {
       ResourceMark rm;
 
       char* buf = NEW_RESOURCE_ARRAY(char, len + 1);
-      strncpy(buf, str, len);
+      memcpy(buf, str, len);
       buf[len] = '\0';
       Exceptions::fthrow(THREAD_AND_LOCATION, vmSymbols::java_lang_IllegalArgumentException(),
         "Boolean parsing error in command argument '%s'. Could not parse: %s.\n", _name, buf);
     }
   }
< prev index next >