Skip to content

Commit

Permalink
8297874: get_dump_directory() in jfrEmergencyDump.cpp should pass cor…
Browse files Browse the repository at this point in the history
…rect length to jio_snprintf

Reviewed-by: mgronlun
  • Loading branch information
calvinccheung committed Jan 10, 2023
1 parent a86b6f6 commit 5a51ef2
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -78,7 +78,7 @@ static size_t get_dump_directory() {
}
const size_t path_len = strlen(_path_buffer);
const int result = jio_snprintf(_path_buffer + path_len,
sizeof(_path_buffer),
sizeof(_path_buffer) - path_len,
"%s",
os::file_separator());
return (result == -1) ? 0 : strlen(_path_buffer);
Expand Down

1 comment on commit 5a51ef2

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.