validate-scenario: Avoid invalid memory access

The name of the action comes directly (i.e. not copied) from the
contained GstStructure field. Therefore make sure to take that
name from the proper structure field (copied just before) and
not from an outside one.
This commit is contained in:
Edward Hervey 2017-05-03 17:57:05 +02:00 committed by Edward Hervey
parent 540200bd0a
commit 790e78c4f8

View file

@ -1596,11 +1596,11 @@ _fill_action (GstValidateScenario * scenario, GstValidateAction * action,
"No timeout time for action %" GST_PTR_FORMAT, structure);
}
if (!(action->name = gst_structure_get_string (structure, "name")))
action->name = "";
action->structure = gst_structure_copy (structure);
if (!(action->name = gst_structure_get_string (action->structure, "name")))
action->name = "";
if (!action->priv->main_structure)
action->priv->main_structure = gst_structure_copy (structure);