Skip to content

Commit 368181e

Browse files
committed
8335808: update for deprecated sprintf for jfrTypeSetUtils
Reviewed-by: mbaesken
1 parent 582bd63 commit 368181e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSetUtils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ static const char* create_hidden_klass_symbol(const InstanceKlass* ik, uintptr_t
207207
const oop mirror = ik->java_mirror_no_keepalive();
208208
assert(mirror != NULL, "invariant");
209209
char hash_buf[40];
210-
sprintf(hash_buf, "/" UINTX_FORMAT, hash);
210+
snprintf(hash_buf, sizeof(hash_buf), "/" UINTX_FORMAT, hash);
211211
const size_t hash_len = strlen(hash_buf);
212212
const size_t result_len = ik->name()->utf8_length();
213213
hidden_symbol = NEW_RESOURCE_ARRAY(char, result_len + hash_len + 1);

0 commit comments

Comments
 (0)