From: Rudi Heitbaum <rudi@heitbaum.com>
To: samba-technical@lists.samba.org, linux-cifs@vger.kernel.org
Cc: rudi@heitbaum.com, pshilovsky@samba.org
Subject: [PATCH cifs-utils] mount.cifs: fix const correctness in parse_options
Date: Tue, 16 Jun 2026 10:18:08 +0000 [thread overview]
Message-ID: <ajEi4CyvM6bcl3bp@a2f8b33cc4be> (raw)
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
reply other threads:[~2026-06-16 10:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ajEi4CyvM6bcl3bp@a2f8b33cc4be \
--to=rudi@heitbaum.com \
--cc=linux-cifs@vger.kernel.org \
--cc=pshilovsky@samba.org \
--cc=samba-technical@lists.samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox