qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] qom: Check for wellformed id in user_creatable_add_type()


From: Kevin Wolf
Subject: Re: [PATCH] qom: Check for wellformed id in user_creatable_add_type()
Date: Mon, 8 Mar 2021 12:17:24 +0100

Am 06.03.2021 um 11:50 hat Paolo Bonzini geschrieben:
> On 02/03/21 18:16, Kevin Wolf wrote:
> > Most code paths for creating a user creatable object go through
> > QemuOpts, which ensures that the provided 'id' option is actually a
> > valid identifier.
> > 
> > However, there are some code paths that don't go through QemuOpts:
> > qemu-storage-daemon --object (since commit 8db1efd3) and QMP object-add
> > (since it was first introduced in commit cff8b2c6). We need to have the
> > same validity check for those, too.
> > 
> > This adds the check and makes it print the same error message as
> > QemuOpts on failure.
> > 
> > Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> > ---
> > This makes sense even without the -object QAPIfication, so no reason to
> > wait for v3 of that series to get this fixed.
> 
> It needs a check for id != NULL, but no big deal so I added it.

Oops, yes. Thanks for fixing it up.

Kevin




reply via email to

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