aboutsummaryrefslogtreecommitdiff
path: root/default-configs
diff options
context:
space:
mode:
authorStefan <stefan-guix@vodafonemail.de>2021-01-09 19:59:42 +0100
committerLaurent Vivier <laurent@vivier.eu>2021-02-13 22:50:50 +0100
commit4df7b7fac84ba570bb33970659296555896232b6 (patch)
tree5ded9d77a9416543c7e6131c81a757739b4736b3 /default-configs
parentccc5ccc17f8cfbfd87d9aede5d12a2d47c56e712 (diff)
downloadqemu-4df7b7fac84ba570bb33970659296555896232b6.zip
qemu-4df7b7fac84ba570bb33970659296555896232b6.tar.gz
qemu-4df7b7fac84ba570bb33970659296555896232b6.tar.bz2
linux-user/syscall: Fix do_ioctl_ifconf() for 64 bit targets.
The sizeof(struct ifreq) is 40 for 64 bit and 32 for 32 bit architectures. This structure contains a union of other structures, of which struct ifmap is the biggest for 64 bit architectures. Calling ioclt(…, SIOCGIFCONF, …) fills a struct sockaddr of that union, and do_ioctl_ifconf() only considered that struct sockaddr for the size of the union, which has the same size as struct ifmap on 32 bit architectures. So do_ioctl_ifconf() assumed a wrong size of 32 for struct ifreq instead of the correct size of 40 on 64 bit architectures. The fix makes do_ioctl_ifconf() handle struct ifmap as the biggest part of the union, treating struct ifreq with the correct size. Signed-off-by: Stefan <stefan-guix@vodafonemail.de> Message-Id: <60AA0765-53DD-43D1-A3D2-75F1778526F6@vodafonemail.de> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'default-configs')
0 files changed, 0 insertions, 0 deletions