From 73a674ac2d737a7a631914b48375681de884ecbc Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Tue, 5 Jan 2021 10:06:40 -0300 Subject: [PATCH] validate: Do not check strv length on NULL pointers This is not legal Part-of: --- validate/gst/validate/gst-validate-scenario.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validate/gst/validate/gst-validate-scenario.c b/validate/gst/validate/gst-validate-scenario.c index bc7586b..9e84c5d 100644 --- a/validate/gst/validate/gst-validate-scenario.c +++ b/validate/gst/validate/gst-validate-scenario.c @@ -4433,7 +4433,7 @@ gst_validate_scenario_get_include_paths (const gchar * relative_scenario) 0) : NULL; g_free (scenarios_path); - n = g_strv_length (env_scenariodir); + n = env_scenariodir ? g_strv_length (env_scenariodir) : 0; env_scenariodir = g_realloc_n (env_scenariodir, n + 3, sizeof (gchar *)); env_scenariodir[n] = g_build_filename (g_get_user_data_dir (), "gstreamer-" GST_API_VERSION, "validate", -- 2.7.4