summaryrefslogtreecommitdiffstats
path: root/libmount/src/optstr.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmount/src/optstr.c')
-rw-r--r--libmount/src/optstr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libmount/src/optstr.c b/libmount/src/optstr.c
index 2c9dd5eb1..bf9f8b71f 100644
--- a/libmount/src/optstr.c
+++ b/libmount/src/optstr.c
@@ -738,7 +738,7 @@ int mnt_optstr_apply_flags(char **optstr, unsigned long flags,
/* don't add options which require values (e.g. offset=%d) */
p = strchr(ent->name, '=');
if (p) {
- if (*(p - 1) == '[')
+ if (p > ent->name && *(p - 1) == '[')
p--; /* name[=] */
else
continue; /* name= */