mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-25 05:45:11 +02:00
8030763: Validate global memory allocation
Add length checks where necessary Reviewed-by: coleenp, mschoene
This commit is contained in:
parent
5323c1c179
commit
7ec22758dc
7 changed files with 11 additions and 30 deletions
|
@ -2123,6 +2123,7 @@ void CompileBroker::set_last_compile(CompilerThread* thread, methodHandle method
|
|||
ResourceMark rm;
|
||||
char* method_name = method->name()->as_C_string();
|
||||
strncpy(_last_method_compiled, method_name, CompileBroker::name_buffer_length);
|
||||
_last_method_compiled[CompileBroker::name_buffer_length - 1] = '\0'; // ensure null terminated
|
||||
char current_method[CompilerCounters::cmname_buffer_length];
|
||||
size_t maxLen = CompilerCounters::cmname_buffer_length;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue