mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-11-27 12:39:52 +01:00
tools: Fix handling of empty argv in various minor GLib tools
This won’t really affect anything, but we might as well fix them to not crash if called with an empty `argv` by someone (ab)using `execve()`. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
@@ -196,7 +196,7 @@ main (gint argc,
|
||||
}
|
||||
|
||||
if (!gen_froots && !gen_tree)
|
||||
return help (argv[i-1]);
|
||||
return help ((argc > 0) ? argv[i-1] : NULL);
|
||||
|
||||
if (!indent_inc)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user