[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] linux-user: Check sscanf return value in open_n
From: |
Stefano Garzarella |
Subject: |
Re: [Qemu-devel] [PATCH] linux-user: Check sscanf return value in open_net_route() |
Date: |
Wed, 6 Feb 2019 10:33:36 +0100 |
User-agent: |
NeoMutt/20180716 |
On Tue, Feb 05, 2019 at 05:42:07PM +0000, Peter Maydell wrote:
> Coverity warns (CID 1390634) that open_net_route() is not
> checking the return value from sscanf(), which means that
> it might then use values that aren't initialized.
>
> Errors here should in general not happen since we're passing
> an assumed-good /proc/net/route from the host kernel, but
> if we do fail to parse a line then just skip it in the output
> we pass to the guest.
>
> Signed-off-by: Peter Maydell <address@hidden>
> ---
> linux-user/syscall.c | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
Reviewed-by: Stefano Garzarella <address@hidden>
Thanks,
Stefano