Skip to content

yanglint BUGFIX const qualifier violation in cmd_load - #2574

Merged
michalvasko merged 1 commit into
CESNET:develfrom
mferreirarivier:gcc15
Nov 12, 2026
Merged

michalvasko merged 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
@michalvasko

Copy link
Copy Markdown
Member

Sorry, it seems this got lost, merging.

@michalvasko
michalvasko merged commit 43bd54b into CESNET:devel Nov 12, 2026
13 checks passed
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