Commit 6c471ebd authored by Philippe Normand's avatar Philippe Normand 🥑
Browse files

gst-inspect: Check for empty env variables

Fixes segfault happening when gst-inspect-1.0 is invoked with empty PAGER or
GST_LESS environment variables
parent a445ff16
Pipeline #455943 waiting for manual action with stages
in 36 seconds
......@@ -1957,13 +1957,16 @@ redirect_stdout (void)
gchar **envp;
pager = g_getenv ("PAGER");
if (pager && !*pager)
return FALSE;
if (pager == NULL)
pager = DEFAULT_PAGER;
argv = g_strsplit (pager, " ", 0);
less = g_getenv ("GST_LESS");
if (less == NULL)
if (less == NULL || !*less)
less = DEFAULT_LESS_OPTS;
envp = g_get_environ ();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment