diff options
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 bba0a0ad..19e41805 100755 --- a/src/wrapped/wrappedlibc.c +++ b/src/wrapped/wrappedlibc.c @@ -604,11 +604,15 @@ EXPORT int my___vfprintf_chk(x64emu_t *emu, void* F, void* fmt, x64_va_list_t b) EXPORT int my__IO_vfprintf(x64emu_t *emu, void* F, void* fmt, x64_va_list_t b) __attribute__((alias("my_vfprintf"))); EXPORT int my_fprintf(x64emu_t *emu, void* F, void* fmt, void* b) { - myStackAlign(emu, (const char*)fmt, b, emu->scratch, R_EAX, 1); + myStackAlign(emu, (const char*)fmt, b, emu->scratch, R_EAX, 2); + PREPARE_VALIST; + return vfprintf(F, fmt, VARARGS); +} +EXPORT int my___fprintf_chk(x64emu_t *emu, void* F, int flag, void* fmt, void* b) { + myStackAlign(emu, (const char*)fmt, b, emu->scratch, R_EAX, 3); PREPARE_VALIST; return vfprintf(F, fmt, VARARGS); } -EXPORT int my___fprintf_chk(x64emu_t *emu, void* F, void* fmt, void* b) __attribute__((alias("my_fprintf"))); #if 0 EXPORT int my_wprintf(x64emu_t *emu, void* fmt, void* b, va_list V) { |