about summary refs log tree commit diff stats
path: root/src/wrapped/wrappedlibssl3.c
diff options
context:
space:
mode:
authorYang Liu <liuyang22@iscas.ac.cn>2023-05-07 22:13:56 +0800
committerGitHub <noreply@github.com>2023-05-07 16:13:56 +0200
commit9f38e81735b10668d64974033b4bb5097219ee34 (patch)
tree57827cc130a3e79a46c58f4e5ce8946c78f4131a /src/wrapped/wrappedlibssl3.c
parent47ecde75ec19a58f458c1131ec1968d11d58e7e1 (diff)
downloadbox64-9f38e81735b10668d64974033b4bb5097219ee34.tar.gz
box64-9f38e81735b10668d64974033b4bb5097219ee34.zip
[WRAPPER] Used RunFunctionFmt for better sign-extend handling (#768)
* [WRAPPER] Used RunFunctionFmt for better sign-extend handling

* [WRAPPER] Fixed some typos

* [WRAPPER] Use L for unsigned long for better portability

* [WRAPPER] More replace from U to L
Diffstat (limited to 'src/wrapped/wrappedlibssl3.c')
-rwxr-xr-xsrc/wrapped/wrappedlibssl3.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/wrapped/wrappedlibssl3.c b/src/wrapped/wrappedlibssl3.c
index 88c758d9..9c287b56 100755
--- a/src/wrapped/wrappedlibssl3.c
+++ b/src/wrapped/wrappedlibssl3.c
@@ -37,7 +37,7 @@ GO(4)
 static uintptr_t my3_pem_passwd_cb_fct_##A = 0;                                                      \
 static int my3_pem_passwd_cb_##A(void* buf, int size, int rwflag, void* password)                    \
 {                                                                                                   \
-    return (int)RunFunction(my_context, my3_pem_passwd_cb_fct_##A, 4, buf, size, rwflag, password);  \
+    return (int)RunFunctionFmt(my_context, my3_pem_passwd_cb_fct_##A, "piip", buf, size, rwflag, password);  \
 }
 SUPER()
 #undef GO
@@ -61,7 +61,7 @@ static void* find_pem_passwd_cb_Fct(void* fct)
 static uintptr_t my3_anonymous_fct_##A = 0;                                      \
 static void* my3_anonymous_##A(void* a, void* b, void* c, void *d)               \
 {                                                                               \
-    return (void*)RunFunction(my_context, my3_anonymous_fct_##A, 4, a, b, c, d);   \
+    return (void*)RunFunctionFmt(my_context, my3_anonymous_fct_##A, "pppp", a, b, c, d);   \
 }
 SUPER()
 #undef GO
@@ -86,7 +86,7 @@ static void* find_anonymous_Fct(void* fct)
 static uintptr_t my3_verify_fct_##A = 0;                                 \
 static int my3_verify_##A(int a, void* b)                                \
 {                                                                       \
-    return (int)RunFunction(my_context, my3_verify_fct_##A, 2, a, b);    \
+    return (int)RunFunctionFmt(my_context, my3_verify_fct_##A, "ip", a, b);    \
 }
 SUPER()
 #undef GO
@@ -120,7 +120,7 @@ static void* reverse_verify_Fct(void* fct)
 static uintptr_t my3_ex_new_fct_##A = 0;                                                        \
 static void my3_ex_new_##A(void* parent, void* ptr, void* ad, int idx, long argl, void* argp)   \
 {                                                                                           \
-    RunFunction(my_context, my3_ex_new_fct_##A, 6, parent, ptr, ad, idx, argl, argp);           \
+    RunFunctionFmt(my_context, my3_ex_new_fct_##A, "pppilp", parent, ptr, ad, idx, argl, argp);           \
 }
 SUPER()
 #undef GO
@@ -144,7 +144,7 @@ static void* find_ex_new_Fct(void* fct)
 static uintptr_t my3_ex_free_fct_##A = 0;                                                        \
 static void my3_ex_free_##A(void* parent, void* ptr, void* ad, int idx, long argl, void* argp)   \
 {                                                                                               \
-    RunFunction(my_context, my3_ex_free_fct_##A, 6, parent, ptr, ad, idx, argl, argp);           \
+    RunFunctionFmt(my_context, my3_ex_free_fct_##A, "pppilp", parent, ptr, ad, idx, argl, argp);           \
 }
 SUPER()
 #undef GO
@@ -168,7 +168,7 @@ static void* find_ex_free_Fct(void* fct)
 static uintptr_t my3_ex_dup_fct_##A = 0;                                                             \
 static int my3_ex_dup_##A(void* to, void* from, void* from_d, int idx, long argl, void* argp)        \
 {                                                                                                   \
-    return (int) RunFunction(my_context, my3_ex_dup_fct_##A, 6, to, from, from_d, idx, argl, argp);  \
+    return (int) RunFunctionFmt(my_context, my3_ex_dup_fct_##A, "pppilp", to, from, from_d, idx, argl, argp);  \
 }
 SUPER()
 #undef GO
@@ -192,7 +192,7 @@ static void* find_ex_dup_Fct(void* fct)
 static uintptr_t my3_client_cb_fct_##A = 0;                                                                              \
 static uint32_t my3_client_cb_##A(void* ssl, void* hint, void* identity, uint32_t id_len, void* psk, uint32_t psk_len)   \
 {                                                                                                                       \
-    return RunFunction(my_context, my3_client_cb_fct_##A, 6, ssl, hint, identity, id_len, psk, psk_len);                 \
+    return RunFunctionFmt(my_context, my3_client_cb_fct_##A, "pppupu", ssl, hint, identity, id_len, psk, psk_len);                 \
 }
 SUPER()
 #undef GO
@@ -216,7 +216,7 @@ static void* find_client_cb_Fct(void* fct)
 static uintptr_t my3_proto_select_fct_##A = 0;                                                           \
 static int my3_proto_select_##A(void* s, void* out, void* outlen, void* in, uint32_t inlen, void* arg)   \
 {                                                                                                       \
-    return (int)RunFunction(my_context, my3_proto_select_fct_##A, 6, s, out, outlen, in, inlen, arg);    \
+    return (int)RunFunctionFmt(my_context, my3_proto_select_fct_##A, "ppppup", s, out, outlen, in, inlen, arg);    \
 }
 SUPER()
 #undef GO
@@ -240,7 +240,7 @@ static void* find_proto_select_Fct(void* fct)
 static uintptr_t my3_client_cert_fct_##A = 0;                                    \
 static int my3_client_cert_##A(void* a, void* b, void* c)                        \
 {                                                                               \
-    return (int)RunFunction(my_context, my3_client_cert_fct_##A, 3, a, b, c);    \
+    return (int)RunFunctionFmt(my_context, my3_client_cert_fct_##A, "ppp", a, b, c);    \
 }
 SUPER()
 #undef GO