diff options
| author | Yang Liu <liuyang22@iscas.ac.cn> | 2023-05-07 22:13:56 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-07 16:13:56 +0200 |
| commit | 9f38e81735b10668d64974033b4bb5097219ee34 (patch) | |
| tree | 57827cc130a3e79a46c58f4e5ce8946c78f4131a /src/wrapped/wrappedlibssl.c | |
| parent | 47ecde75ec19a58f458c1131ec1968d11d58e7e1 (diff) | |
| download | box64-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/wrappedlibssl.c')
| -rwxr-xr-x | src/wrapped/wrappedlibssl.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/wrapped/wrappedlibssl.c b/src/wrapped/wrappedlibssl.c index 14f28ae9..040e3f89 100755 --- a/src/wrapped/wrappedlibssl.c +++ b/src/wrapped/wrappedlibssl.c @@ -41,7 +41,7 @@ GO(4) static uintptr_t my_pem_passwd_cb_fct_##A = 0; \ static int my_pem_passwd_cb_##A(void* buf, int size, int rwflag, void* password) \ { \ - return (int)RunFunction(my_context, my_pem_passwd_cb_fct_##A, 4, buf, size, rwflag, password); \ + return (int)RunFunctionFmt(my_context, my_pem_passwd_cb_fct_##A, "piip", buf, size, rwflag, password); \ } SUPER() #undef GO @@ -65,7 +65,7 @@ static void* find_pem_passwd_cb_Fct(void* fct) static uintptr_t my_anonymous_fct_##A = 0; \ static void* my_anonymous_##A(void* a, void* b, void* c, void *d) \ { \ - return (void*)RunFunction(my_context, my_anonymous_fct_##A, 4, a, b, c, d); \ + return (void*)RunFunctionFmt(my_context, my_anonymous_fct_##A, "pppp", a, b, c, d); \ } SUPER() #undef GO @@ -90,7 +90,7 @@ static void* find_anonymous_Fct(void* fct) static uintptr_t my_verify_fct_##A = 0; \ static int my_verify_##A(int a, void* b) \ { \ - return (int)RunFunction(my_context, my_verify_fct_##A, 2, a, b); \ + return (int)RunFunctionFmt(my_context, my_verify_fct_##A, "ip", a, b); \ } SUPER() #undef GO @@ -124,7 +124,7 @@ static void* reverse_verify_Fct(void* fct) static uintptr_t my_ex_new_fct_##A = 0; \ static void my_ex_new_##A(void* parent, void* ptr, void* ad, int idx, long argl, void* argp) \ { \ - RunFunction(my_context, my_ex_new_fct_##A, 6, parent, ptr, ad, idx, argl, argp); \ + RunFunctionFmt(my_context, my_ex_new_fct_##A, "pppilp", parent, ptr, ad, idx, argl, argp); \ } SUPER() #undef GO @@ -148,7 +148,7 @@ static void* find_ex_new_Fct(void* fct) static uintptr_t my_ex_free_fct_##A = 0; \ static void my_ex_free_##A(void* parent, void* ptr, void* ad, int idx, long argl, void* argp) \ { \ - RunFunction(my_context, my_ex_free_fct_##A, 6, parent, ptr, ad, idx, argl, argp); \ + RunFunctionFmt(my_context, my_ex_free_fct_##A, "pppilp", parent, ptr, ad, idx, argl, argp); \ } SUPER() #undef GO @@ -172,7 +172,7 @@ static void* find_ex_free_Fct(void* fct) static uintptr_t my_ex_dup_fct_##A = 0; \ static int my_ex_dup_##A(void* to, void* from, void* from_d, int idx, long argl, void* argp) \ { \ - return (int) RunFunction(my_context, my_ex_dup_fct_##A, 6, to, from, from_d, idx, argl, argp); \ + return (int) RunFunctionFmt(my_context, my_ex_dup_fct_##A, "pppilp", to, from, from_d, idx, argl, argp); \ } SUPER() #undef GO @@ -196,7 +196,7 @@ static void* find_ex_dup_Fct(void* fct) static uintptr_t my_client_cb_fct_##A = 0; \ static uint32_t my_client_cb_##A(void* ssl, void* hint, void* identity, uint32_t id_len, void* psk, uint32_t psk_len) \ { \ - return RunFunction(my_context, my_client_cb_fct_##A, 6, ssl, hint, identity, id_len, psk, psk_len); \ + return RunFunctionFmt(my_context, my_client_cb_fct_##A, "pppupu", ssl, hint, identity, id_len, psk, psk_len); \ } SUPER() #undef GO @@ -220,7 +220,7 @@ static void* find_client_cb_Fct(void* fct) static uintptr_t my_proto_select_fct_##A = 0; \ static int my_proto_select_##A(void* s, void* out, void* outlen, void* in, uint32_t inlen, void* arg) \ { \ - return (int)RunFunction(my_context, my_proto_select_fct_##A, 6, s, out, outlen, in, inlen, arg); \ + return (int)RunFunctionFmt(my_context, my_proto_select_fct_##A, "ppppup", s, out, outlen, in, inlen, arg); \ } SUPER() #undef GO @@ -244,7 +244,7 @@ static void* find_proto_select_Fct(void* fct) static uintptr_t my_client_cert_fct_##A = 0; \ static int my_client_cert_##A(void* a, void* b, void* c) \ { \ - return (int)RunFunction(my_context, my_client_cert_fct_##A, 3, a, b, c); \ + return (int)RunFunctionFmt(my_context, my_client_cert_fct_##A, "ppp", a, b, c); \ } SUPER() #undef GO @@ -268,7 +268,7 @@ static void* find_client_cert_Fct(void* fct) static uintptr_t my_alpn_select_fct_##A = 0; \ static int my_alpn_select_##A(void* a, void* b, void* c, void* d, uint32_t e, void* f) \ { \ - return (int)RunFunction(my_context, my_alpn_select_fct_##A, 6, a, b, c, d, e, f); \ + return (int)RunFunctionFmt(my_context, my_alpn_select_fct_##A, "ppppup", a, b, c, d, e, f); \ } SUPER() #undef GO |