Re: [PATCH] linux-user: Fix Coverity CID 1430271 / CID 1430272

2020-07-13 Thread Laurent Vivier
Le 09/07/2020 à 22:00, Laurent Vivier a écrit : > In new functions print_ioctl() and print_syscall_ret_ioctl(), we don't > check if lock_user() returns NULL and this would cause a segfault in > thunk_print(). > > If lock_user() returns NULL don't call thunk_print() but prints only the > value of

Re: [PATCH] linux-user: Fix Coverity CID 1430271 / CID 1430272

2020-07-09 Thread Peter Maydell
On Thu, 9 Jul 2020 at 21:00, Laurent Vivier wrote: > > In new functions print_ioctl() and print_syscall_ret_ioctl(), we don't > check if lock_user() returns NULL and this would cause a segfault in > thunk_print(). > > If lock_user() returns NULL don't call thunk_print() but prints only the >

[PATCH] linux-user: Fix Coverity CID 1430271 / CID 1430272

2020-07-09 Thread Laurent Vivier
In new functions print_ioctl() and print_syscall_ret_ioctl(), we don't check if lock_user() returns NULL and this would cause a segfault in thunk_print(). If lock_user() returns NULL don't call thunk_print() but prints only the value of the (invalid) pointer. Tested with: # cat ioctl.c