diff options
Diffstat (limited to 'libmount/src/optstr.c')
-rw-r--r-- | libmount/src/optstr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libmount/src/optstr.c b/libmount/src/optstr.c index c8beadad2..2c9dd5eb1 100644 --- a/libmount/src/optstr.c +++ b/libmount/src/optstr.c @@ -307,7 +307,7 @@ int mnt_optstr_remove_option_at(char **optstr, char *begin, char *end) sz = strlen(end); memmove(begin, end, sz + 1); - if (!*begin && *(begin - 1) == ',') + if (!*begin && (begin > *optstr) && *(begin - 1) == ',') *(begin - 1) = '\0'; return 0; |