All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH cifs-utils] mount.cifs: fix const correctness in parse_options
@ 2026-06-16 10:18 Rudi Heitbaum
  0 siblings, 0 replies; only message in thread
From: Rudi Heitbaum @ 2026-06-16 10:18 UTC (permalink / raw)
  To: samba-technical, linux-cifs; +Cc: rudi, pshilovsky

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.

Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
---
 mount.cifs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mount.cifs.c b/mount.cifs.c
index 836a060..b57c7d3 100644
--- a/mount.cifs.c
+++ b/mount.cifs.c
@@ -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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-16 10:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-16 10:18 [PATCH cifs-utils] mount.cifs: fix const correctness in parse_options Rudi Heitbaum

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.