mirror of
https://github.com/status-im/c-kzg-4844.git
synced 2025-01-22 07:58:54 +00:00
[Java] Change sprintf to snprintf (#285)
This commit is contained in:
parent
64af10e37b
commit
8f43b2e3ca
@ -38,7 +38,7 @@ void throw_c_kzg_exception(JNIEnv *env, C_KZG_RET error_code, const char *messag
|
||||
void throw_invalid_size_exception(JNIEnv *env, const char *prefix, size_t size, size_t expected_size)
|
||||
{
|
||||
char message[100];
|
||||
sprintf(message, "%s Expected %zu bytes but got %zu.", prefix, expected_size, size);
|
||||
snprintf(message, sizeof(message), "%s Expected %zu bytes but got %zu.", prefix, expected_size, size);
|
||||
throw_c_kzg_exception(env, C_KZG_BADARGS, message);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user