projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7128c9
)
linux-user: fix undefined shift in copy_to_user_fdset
author
Andreas Schwab
<schwab@suse.de>
Tue, 9 Apr 2013 01:02:34 +0000
(
01:02
+0000)
committer
Riku Voipio
<riku.voipio@linaro.org>
Fri, 19 Apr 2013 07:48:51 +0000
(10:48 +0300)
If TARGET_ABI_BITS is bigger than 32 we shift by more than the size of int.
Signed-off-by: Andreas Schwab <schwab@suse.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
linux-user/syscall.c
patch
|
blob
|
history
diff --git
a/linux-user/syscall.c
b/linux-user/syscall.c
index d6d20502edf50947fe7f3ec3f93943015b059667..5a786f2fef8e3cab679e2155d3fe5ec27c9598be 100644
(file)
--- a/
linux-user/syscall.c
+++ b/
linux-user/syscall.c
@@
-914,7
+914,7
@@
static inline abi_long copy_to_user_fdset(abi_ulong target_fds_addr,
for (i = 0; i < nw; i++) {
v = 0;
for (j = 0; j < TARGET_ABI_BITS; j++) {
- v |= ((FD_ISSET(k, fds) != 0) << j);
+ v |= ((
abi_ulong)(
FD_ISSET(k, fds) != 0) << j);
k++;
}
__put_user(v, &target_fds[i]);