diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c index 343b8d33..5e31a131 100644 --- a/src/ntfs-3g.c +++ b/src/ntfs-3g.c @@ -1671,7 +1671,7 @@ static char *parse_mount_options(const char *orig_opts) ctx->silent = TRUE; s = options; - while ((val = strsep(&s, ","))) { + while (s && *s && (val = strsep(&s, ","))) { opt = strsep(&val, "="); if (!strcmp(opt, "ro")) { /* Read-only mount. */ if (val) {