Skip to content

Fix kore_block_dump#1218

Merged
ehildenb merged 1 commit into
developfrom
fix-block-dump
May 28, 2026
Merged

Fix kore_block_dump#1218
ehildenb merged 1 commit into
developfrom
fix-block-dump

Conversation

@tothtamas28
Copy link
Copy Markdown
Contributor

@tothtamas28 tothtamas28 commented May 27, 2026

The previous implementation called std::strlen on the data field of the string * returned by print_configuration_to_string, then used that length to allocate and copy the result. However, the runtime string type is not null terminated, strlen therefore reads past the end of the buffer.

This is fixed by calling len() on the string * to obtain the correct length, and replacing strncpy with memcpy to copy exactly that many bytes.

@tothtamas28 tothtamas28 self-assigned this May 27, 2026
@ehildenb ehildenb merged commit fab19ea into develop May 28, 2026
10 checks passed
@ehildenb ehildenb deleted the fix-block-dump branch May 28, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants