Skip to content

string_pool.rs: Fix UB#95

Merged
shepmaster merged 1 commit into
shepmaster:masterfrom
glebm:patch-1
Jun 11, 2025
Merged

string_pool.rs: Fix UB#95
shepmaster merged 1 commit into
shepmaster:masterfrom
glebm:patch-1

Conversation

@glebm

@glebm glebm commented Jun 9, 2025

Copy link
Copy Markdown
Contributor

from_raw_parts requires the first length values to be initialized but here we're not initializing any (likely doesn't matter for u8).

I'm guessing the whole file can be rewritten in a much nicer way with modern Rust (probably vectors are not needed to allocate a fixed chunk of memory?)

`from_raw_parts` requires the first `length` values to be initialized but here we're not initializing any (likely doesn't matter for u8)
@shepmaster shepmaster merged commit fa66d4f into shepmaster:master Jun 11, 2025
5 checks passed
@shepmaster

Copy link
Copy Markdown
Owner

Thanks!

@glebm glebm deleted the patch-1 branch June 11, 2025 17:49
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