aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/credential/osxkeychain/git-credential-osxkeychain.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/credential/osxkeychain/git-credential-osxkeychain.c')
-rw-r--r--contrib/credential/osxkeychain/git-credential-osxkeychain.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/credential/osxkeychain/git-credential-osxkeychain.c b/contrib/credential/osxkeychain/git-credential-osxkeychain.c
index 1c8310d7fe..611c9798b3 100644
--- a/contrib/credential/osxkeychain/git-credential-osxkeychain.c
+++ b/contrib/credential/osxkeychain/git-credential-osxkeychain.c
@@ -422,7 +422,7 @@ int main(int argc, const char **argv)
const char *usage =
"usage: git credential-osxkeychain <get|store|erase>";
- if (!argv[1])
+ if (argc < 2 || !*argv[1])
die("%s", usage);
if (open(argv[0], O_RDONLY | O_EXLOCK) == -1)