Fix compat decoding of struct sigaction.sa_mask on big endian architectures

* signal.c (decode_new_sigaction) [SUPPORTED_PERSONALITIES > 1 &&
SIZEOF_LONG > 4]: Use LONG_LONG to convert sa_mask from 32-bit
struct sigaction to 64-bit struct sigaction.
This commit is contained in:
Дмитрий Левин 2016-08-20 00:08:10 +00:00
parent 3dfed0ef4e
commit aa0c46ffed

View File

@ -545,7 +545,7 @@ decode_new_sigaction(struct tcb *tcp, long addr)
* For little-endian, it's the same.
* For big-endian, we swap 32-bit words.
*/
sa.sa_mask[0] = sa32.sa_mask[0] + ((long)(sa32.sa_mask[1]) << 32);
sa.sa_mask[0] = LONG_LONG(sa32.sa_mask[0], sa32.sa_mask[1]);
} else
#endif
if (umove_or_printaddr(tcp, addr, &sa))