summaryrefslogtreecommitdiff
path: root/ubifs-utils
diff options
context:
space:
mode:
Diffstat (limited to 'ubifs-utils')
-rw-r--r--ubifs-utils/mkfs.ubifs/mkfs.ubifs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c b/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c
index 8211ada..15e6bdc 100644
--- a/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c
+++ b/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c
@@ -733,6 +733,7 @@ static int get_options(int argc, char**argv)
if (!context)
return err_msg("xmalloc failed\n");
memcpy(context, optarg, context_len);
+ context[context_len] = '\0';
/* Make sure root directory exists */
if (stat(context, &context_st))