mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
validate-scenario: Initialize variable correctly
ret needs to be always reset to FALSE *before* checking attempting to load the individual files. Otherwise there's the possibility it would silently accept an invalid scenario name Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/196>
This commit is contained in:
parent
8697663d8c
commit
5e2df60422
1 changed files with 3 additions and 1 deletions
|
@ -3800,7 +3800,7 @@ gst_validate_scenario_load (GstValidateScenario * scenario,
|
|||
{
|
||||
gchar **scenarios = NULL;
|
||||
guint i;
|
||||
gboolean found_actions = FALSE, is_config, ret = TRUE;
|
||||
gboolean found_actions = FALSE, is_config, ret = FALSE;
|
||||
gchar **include_paths = gst_validate_scenario_get_include_paths (NULL);
|
||||
|
||||
if (!scenario_name)
|
||||
|
@ -3812,6 +3812,8 @@ gst_validate_scenario_load (GstValidateScenario * scenario,
|
|||
guint include_i;
|
||||
gchar *lfilename = NULL, *tldir = NULL, *scenario_file = NULL;
|
||||
|
||||
ret = FALSE;
|
||||
|
||||
/* First check if the scenario name is not a full path to the
|
||||
* actual scenario */
|
||||
if (g_file_test (scenarios[i], G_FILE_TEST_IS_REGULAR)) {
|
||||
|
|
Loading…
Reference in a new issue