This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-crypto.git


The following commit(s) were added to refs/heads/master by this push:
     new 53087dac Use actual size
53087dac is described below

commit 53087dacc9b792d2e7437bb247690fb7924a63b7
Author: Sebb <s...@apache.org>
AuthorDate: Sat Nov 4 14:49:39 2023 +0000

    Use actual size
---
 src/main/native/org/apache/commons/crypto/org_apache_commons_crypto.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/src/main/native/org/apache/commons/crypto/org_apache_commons_crypto.h 
b/src/main/native/org/apache/commons/crypto/org_apache_commons_crypto.h
index fed2b036..c26ae5f2 100644
--- a/src/main/native/org/apache/commons/crypto/org_apache_commons_crypto.h
+++ b/src/main/native/org/apache/commons/crypto/org_apache_commons_crypto.h
@@ -266,14 +266,14 @@ static FARPROC WINAPI do_dlsym_fallback(JNIEnv *env, 
HMODULE handle, LPCSTR symb
 #define LOCK_CLASS(env, clazz, classname) \
   if ((*env)->MonitorEnter(env, clazz) != 0) { \
     char exception_msg[128]; \
-    snprintf(exception_msg, 128, "Failed to lock %s", classname); \
+    snprintf(exception_msg, sizeof(exception_msg), "Failed to lock %s", 
classname); \
     THROW(env, "java/lang/InternalError", exception_msg); \
   }
 
 #define UNLOCK_CLASS(env, clazz, classname) \
   if ((*env)->MonitorExit(env, clazz) != 0) { \
     char exception_msg[128]; \
-    snprintf(exception_msg, 128, "Failed to unlock %s", classname); \
+    snprintf(exception_msg, sizeof(exception_msg), "Failed to unlock %s", 
classname); \
     THROW(env, "java/lang/InternalError", exception_msg); \
   }
 

Reply via email to