summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mount.cifs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mount.cifs.c b/mount.cifs.c
index aa4581f..1e3d534 100644
--- a/mount.cifs.c
+++ b/mount.cifs.c
@@ -837,7 +837,7 @@ static int parse_opt_token(const char *token)
return OPT_GUEST;
if (strncmp(token, "ro", 2) == 0)
return OPT_RO;
- if (strncmp(token, "rw", 2) == 0)
+ if (strncmp(token, "rw", 2) == 0 && strlen(token) == 2)
return OPT_RW;
if (strncmp(token, "remount", 7) == 0)
return OPT_REMOUNT;