mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-23 21:35:26 +03:00
ostree: avoid a segfault
When running ostree --repo=/ostree/repo without further arguments, we end up calling strcmp with one argument being NULL.
This commit is contained in:
parent
4a03176489
commit
07f67f3baf
@ -140,7 +140,7 @@ ostree_main (int argc,
|
||||
builtin = builtins;
|
||||
while (builtin->name)
|
||||
{
|
||||
if (strcmp (cmd, builtin->name) == 0)
|
||||
if (g_strcmp0 (cmd, builtin->name) == 0)
|
||||
break;
|
||||
builtin++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user