* [PATCH cifs-utils] mount.cifs: fix const correctness in parse_options
@ 2026-06-16 10:18 Rudi Heitbaum
2026-06-23 22:05 ` Steve French
0 siblings, 1 reply; 2+ messages 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] 2+ messages in thread* Re: [PATCH cifs-utils] mount.cifs: fix const correctness in parse_options
2026-06-16 10:18 [PATCH cifs-utils] mount.cifs: fix const correctness in parse_options Rudi Heitbaum
@ 2026-06-23 22:05 ` Steve French
0 siblings, 0 replies; 2+ messages in thread
From: Steve French @ 2026-06-23 22:05 UTC (permalink / raw)
To: Rudi Heitbaum; +Cc: samba-technical, linux-cifs, pshilovsky
merged into cifs-utils and smb3-utils for-next
On Tue, Jun 16, 2026 at 5:33 AM Rudi Heitbaum <rudi@heitbaum.com> wrote:
>
> 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
>
>
--
Thanks,
Steve
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-23 22:05 UTC | newest]
Thread overview: 2+ messages (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
2026-06-23 22:05 ` Steve French
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox