diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2022-07-11 19:59:24 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2022-07-11 19:59:24 +0200 |
| commit | bf79be222cbe73d25b2d90232467f61f4f85a88d (patch) | |
| tree | df598271735c8cc32e39665d546666393817eafe /src/wrapped/wrappedlibc.c | |
| parent | 1bb27f2b807c3a9b67a0fdaf52f7390c6551acdd (diff) | |
| download | box64-bf79be222cbe73d25b2d90232467f61f4f85a88d.tar.gz box64-bf79be222cbe73d25b2d90232467f61f4f85a88d.zip | |
Added __fwprintf_chk wrapped function (for KSP)
Diffstat (limited to 'src/wrapped/wrappedlibc.c')
| -rwxr-xr-x | src/wrapped/wrappedlibc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c index 6c407414..252e9b13 100755 --- a/src/wrapped/wrappedlibc.c +++ b/src/wrapped/wrappedlibc.c @@ -640,9 +640,13 @@ EXPORT int my_fwprintf(x64emu_t *emu, void* F, void* fmt, void* b) { return vfwprintf(F, fmt, VARARGS); } -#if 0 -EXPORT int my___fwprintf_chk(x64emu_t *emu, void* F, void* fmt, void* b, va_list V) __attribute__((alias("my_fwprintf"))); +EXPORT int my___fwprintf_chk(x64emu_t *emu, void* F, int flag, void* fmt, void* b) { + myStackAlignW(emu, (const char*)fmt, b, emu->scratch, R_EAX, 3); + PREPARE_VALIST; + return vfwprintf(F, fmt, VARARGS); +} +#if 0 EXPORT int my_vfwprintf(x64emu_t *emu, void* F, void* fmt, void* b) { #ifndef NOALIGN myStackAlignW((const char*)fmt, b, emu->scratch); |