[ostree/easy-fixes: 3/4] ostree: avoid a segfault
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree/easy-fixes: 3/4] ostree: avoid a segfault
- Date: Sun, 6 May 2012 02:41:28 +0000 (UTC)
commit f3d4f3ab8c4bb652e952dde44e8cf896098460d7
Author: Matthias Clasen <mclasen redhat com>
Date: Sat May 5 20:59:23 2012 -0400
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 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/ostree/ot-main.c b/src/ostree/ot-main.c
index f328faf..3bdc4b3 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++;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]