Skip to content

Conversation

bavshin-f5
Copy link
Member

A valid empty ngx_str_t is allowed to have an uninitialized data pointer, so calling slice::from_raw_parts() on it is not safe.
Thankfully, we've already solved this in ngx_str_t::as_bytes() and can just use the method.

Fixes #150

@bavshin-f5 bavshin-f5 merged commit b09e48e into nginx:master Apr 17, 2025
10 checks passed
@bavshin-f5 bavshin-f5 deleted the ngx-str-default-150 branch April 17, 2025 23:50
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.

NgxStr Default 问题

2 participants