From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Mansour Ahmadi <ManSoSec@gmail.com>,
qemu-devel@nongnu.org, Qemu-block <qemu-block@nongnu.org>
Subject: Re: Potential Null dereference
Date: Tue, 24 Mar 2020 08:14:11 +0100 [thread overview]
Message-ID: <336bbdf8-140a-e884-d5d1-0610a9b1c6a6@redhat.com> (raw)
In-Reply-To: <CAGT9xrCJSy6yQ48p3hCRuwgV7t8vPS7eo+83_pOiPp0gDOfvvQ@mail.gmail.com>
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
>
next prev parent reply other threads:[~2020-03-24 7:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-24 3:05 Potential Null dereference Mansour Ahmadi
2020-03-24 7:14 ` Philippe Mathieu-Daudé [this message]
2020-03-24 9:50 ` Kevin Wolf
2020-03-24 11:59 ` Vladimir Sementsov-Ogievskiy
2020-03-24 12:37 ` Vladimir Sementsov-Ogievskiy
2020-03-24 12:58 ` Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=336bbdf8-140a-e884-d5d1-0610a9b1c6a6@redhat.com \
--to=philmd@redhat.com \
--cc=ManSoSec@gmail.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).