Fixed a potential issue with stack overwritten on sigaction call

This commit is contained in:
ptitSeb 2022-04-24 15:03:42 +02:00
parent 5cdd2d4947
commit 0e9a422335

View File

@ -1072,7 +1072,7 @@ int EXPORT my_syscall_sigaction(x86emu_t* emu, int signum, const x86_sigaction_r
ret = sigaction(signum, act?&newact:NULL, oldact?&old:NULL);
if(oldact && ret==0) {
oldact->sa_flags = old.sa_flags;
oldact->sa_mask = old.sa_mask;
memcpy(&oldact->sa_mask, &old.sa_mask, (sigsetsize>8)?8:sigsetsize);
if(old.sa_flags & 0x04)
oldact->_u._sa_sigaction = old.sa_sigaction; //TODO should wrap...
else