mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
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:
parent
540200bd0a
commit
790e78c4f8
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue