[olympic,nostalgia] Address unsafe buffer warnings
This commit is contained in:
@ -12,10 +12,12 @@
|
||||
namespace studio {
|
||||
|
||||
FDFilterItem::FDFilterItem(ox::StringViewCR pName, ox::StringViewCR pSpec) noexcept {
|
||||
OX_ALLOW_UNSAFE_BUFFERS_BEGIN
|
||||
name.resize(pName.len() + 1);
|
||||
ox::strncpy(name.data(), pName.data(), pName.len());
|
||||
spec.resize(pSpec.len() + 1);
|
||||
ox::strncpy(spec.data(), pSpec.data(), pSpec.len());
|
||||
OX_ALLOW_UNSAFE_BUFFERS_END
|
||||
}
|
||||
|
||||
static ox::Result<ox::String> toResult(nfdresult_t r, NFD::UniquePathN const&path) noexcept {
|
||||
|
Reference in New Issue
Block a user