From: Dmitry V. Levin Date: Sat, 20 Aug 2016 00:08:10 +0000 (+0000) Subject: Fix compat decoding of struct sigaction.sa_mask on big endian architectures X-Git-Tag: v4.14~186 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aa0c46ffeda837bb01f57167d506ce36f680eb66;p=strace 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. --- diff --git a/signal.c b/signal.c index cb200bfd..5b530cf4 100644 --- a/signal.c +++ b/signal.c @@ -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))