aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/fusermount.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/fusermount.c b/util/fusermount.c
index 45e96bc..243d25e 100644
--- a/util/fusermount.c
+++ b/util/fusermount.c
@@ -1270,7 +1270,7 @@ int main(int argc, char *argv[])
{"version", no_argument, NULL, 'V'},
{0, 0, 0, 0}};
- progname = strdup(argv[0]);
+ progname = strdup(argc > 0 ? argv[0] : "fusermount");
if (progname == NULL) {
fprintf(stderr, "%s: failed to allocate memory\n", argv[0]);
exit(1);