[olympic,nostalgia] Address unsafe buffer warnings

This commit is contained in:
2025-05-06 22:25:36 -05:00
parent a8c1387d5a
commit d8195d300d
15 changed files with 55 additions and 42 deletions

View File

@ -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 {