From 07f67f3baf1e3c3877eb12e10a4549772106db1a Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 5 May 2012 20:59:23 -0400 Subject: [PATCH] ostree: avoid a segfault When running ostree --repo=/ostree/repo without further arguments, we end up calling strcmp with one argument being NULL. --- src/ostree/ot-main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ostree/ot-main.c b/src/ostree/ot-main.c index f328faf2..3bdc4b3d 100644 --- a/src/ostree/ot-main.c +++ b/src/ostree/ot-main.c @@ -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++; }