Skip to contentSkip to conversation

mount.cifs: fix const correctness in parse_options

PATCH Applied Rudi Heitbaum 2 participants 2 messages Jun 16 – Jun 23

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mount.cifs: fix const correctness in parse_options

parse_options() modifies the string it receives in-place, temporarily null-terminating keyword and value boundaries. The const qualifier on the data parameter was wrong; remove it so the compiler can verify the pointer assignments are valid.

---
 mount.cifs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mount.cifs.c +1 -1
index 836a060..b57c7d3 100644
@@ -834,7 +834,7 @@ static int parse_opt_token(const char *token)
 }
 
 static int
-parse_options(const char *data, struct parsed_mount_info *parsed_info)
+parse_options(char *data, struct parsed_mount_info *parsed_info)
 {
 	char *value = NULL;
 	char *equals = NULL;
Signature · 1 line
2.53.0
Applied
#1 lore raw

merged into cifs-utils and smb3-utils for-next

Quoted 28 lines · Rudi Heitbaum

parse_options() modifies the string it receives in-place, temporarily null-terminating keyword and value boundaries. The const qualifier on the data parameter was wrong; remove it so the compiler can verify the pointer assignments are valid.

---
 mount.cifs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mount.cifs.c +1 -2
index 836a060..b57c7d3 100644
@@ -834,7 +834,7 @@ static int parse_opt_token(const char *token)
 }
 
 static int
-parse_options(const char *data, struct parsed_mount_info *parsed_info)
+parse_options(char *data, struct parsed_mount_info *parsed_info)
 {
        char *value = NULL;
        char *equals = NULL;
--

2.53.0

Signature · 3 lines
Thanks,

Steve