mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-06-01 19:41:28 +00:00
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
This commit is contained in:
parent
a445ff1607
commit
6c471ebd5c
|
@ -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 ();
|
||||
|
|
Loading…
Reference in a new issue