Am 26.02.2021 um 12:30 hat Paolo Bonzini geschrieben:
> On 24/02/21 14:52, Kevin Wolf wrote:
> > +    v = qobject_output_visitor_new(&qobj);
> > +    visit_type_ObjectOptions(v, NULL, &options, &error_abort);
> > +    visit_complete(v, &qobj);
> > +    visit_free(v);
> > +
> > +    props = qobject_to(QDict, qobj);
> > +    qdict_del(props, "qom-type");
> > +    qdict_del(props, "id");
> > +
> > +    v = qobject_input_visitor_new(QOBJECT(props));
> > +    obj = user_creatable_add_type(ObjectType_str(options->qom_type),
> > +                                  options->id, props, v, errp);
> > +    object_unref(obj);
> 
> Please add a check in object_property_add_child that the id is well formed
> (using the id_wellformed function).  This is pre-existing, but it becomes a
> regression for -object later in the series.

Are the conditions for internally called object_property_add_child()
actually the same as for IDs specified by the user? For example, I seem
to remember some array-ish properties with [] in their name which aren't
allowed by id_wellformed().

The obvious place to affect only the external interfaces would be
user_creatable_add_type().

Kevin


Reply via email to