Skip to content

Commit

Permalink
8335808: update for deprecated sprintf for jfrTypeSetUtils
Browse files Browse the repository at this point in the history
Reviewed-by: mbaesken
  • Loading branch information
gdams committed Jul 8, 2024
1 parent 582bd63 commit 368181e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static const char* create_hidden_klass_symbol(const InstanceKlass* ik, uintptr_t
const oop mirror = ik->java_mirror_no_keepalive();
assert(mirror != NULL, "invariant");
char hash_buf[40];
sprintf(hash_buf, "/" UINTX_FORMAT, hash);
snprintf(hash_buf, sizeof(hash_buf), "/" UINTX_FORMAT, hash);
const size_t hash_len = strlen(hash_buf);
const size_t result_len = ik->name()->utf8_length();
hidden_symbol = NEW_RESOURCE_ARRAY(char, result_len + hash_len + 1);
Expand Down

1 comment on commit 368181e

@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.