Skip to content

yanglint BUGFIX const qualifier violation in cmd_load - #2574

Open
mferreirarivier wants to merge 1 commit into
CESNET:develfrom
mferreirarivier:gcc15
Open

mferreirarivier wants to merge 1 commit into
CESNET:develfrom
mferreirarivier:gcc15

Conversation

@mferreirarivier

Copy link
Copy Markdown

cmd_load_exec is called with an immutable string as posv. Cast of strchr return silently discards that const qualifier, so posv ends up modified in cmd_load regardless of it.

Duplicate an owned copy before splitting the name and the revision, the same way it is done in cmd_print.

cmd_load_exec is called with an immutable string as posv. Cast of
strchr return silently discards that const qualifier, so posv ends up
modified in cmd_load regardless of it.

Duplicate an owned copy before splitting the name and the revision,
the same way it is done in cmd_print.

Signed-off-by: Matthieu Ferreira Rivier <matthieu.ferreira-rivier@6wind.com>
@michalvasko

Copy link
Copy Markdown
Member

Thanks, but change the target branch to devel, please.

@mferreirarivier
mferreirarivier changed the base branch from master to devel September 18, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants