qemu-block
[Top][All Lists]
Advanced

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

Re: Potential Null dereference


From: Philippe Mathieu-Daudé
Subject: Re: Potential Null dereference
Date: Tue, 24 Mar 2020 08:14:11 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

On 3/24/20 4:05 AM, Mansour Ahmadi wrote:
Hi,

Nullness of  needs to be checked here:
https://github.com/qemu/qemu/blob/c532b954d96f96d361ca31308f75f1b95bd4df76/block/commit.c#L221

pstrcpy(bs->exact_filename, sizeof(bs->exact_filename),...


While it is done at 2 other locations:
https://github.com/qemu/qemu/blob/c532b954d96f96d361ca31308f75f1b95bd4df76/block/backup-top.c#L113
https://github.com/qemu/qemu/blob/c532b954d96f96d361ca31308f75f1b95bd4df76/block/mirror.c#L1477

if(bs->backing== NULL) {return}

Thanks for spotting this. Do you mind sending a patch?


Thanks,
Mansour





reply via email to

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