OSDN Git Service

Fix linux-user crashes in ioctl(SIOCGIFCONF) when ifc_buf is NULL.
authorKan Li <likan_999.student@sina.com>
Wed, 24 Oct 2018 20:13:03 +0000 (20:13 +0000)
committerLaurent Vivier <laurent@vivier.eu>
Thu, 7 Feb 2019 13:04:03 +0000 (14:04 +0100)
commit22e4a267a6627e5b5b1b13bfc1b92445775704be
treea882fd91fe6dfb9ff61100348afbc70a3237b064
parent47994e16b1d66411953623e7c0bf0cdcd50bd507
Fix linux-user crashes in ioctl(SIOCGIFCONF) when ifc_buf is NULL.

Summary:
This is to fix bug https://bugs.launchpad.net/qemu/+bug/1796754.
It is valid for ifc_buf to be NULL according to
http://man7.org/linux/man-pages/man7/netdevice.7.html.

Signed-off-by: Kan Li <likan_999.student@sina.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Message-Id: <20181024201303.114-1-likan_999.student@sina.com>
[lv: fix errors reported by checkpatch.pl]
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/syscall.c