qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/2] ipmi: don't try to open a NULL filename


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 2/2] ipmi: don't try to open a NULL filename
Date: Tue, 25 Apr 2017 08:18:43 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0

On 04/25/2017 01:51 AM, Cédric Le Goater wrote:
> Currenlty, the code relies on the fact that open() handles NULL
> filenames but that can cause an error with new clang:

POSIX doesn't require it to work. Linux is nice and gives you EFAULT,
but there are systems where open(NULL) crashes with SIGSEGV.  The clang
warning is correct.

> 
>   hw/core/loader.c:67:15: runtime error: null pointer passed as argument 1,
>   which is declared to never be null
> 
> Signed-off-by: Cédric Le Goater <address@hidden>
> ---
>  hw/ipmi/ipmi_bmc_sim.c | 5 +++++
>  1 file changed, 5 insertions(+)

Reviewed-by: Eric Blake <address@hidden>


-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]