[Webkit-unassigned] [Bug 281919] New: WebCore::DecodedHTMLEntity::span() should use std::span::first()
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Oct 22 14:22:56 PDT 2024
https://bugs.webkit.org/show_bug.cgi?id=281919
Bug ID: 281919
Summary: WebCore::DecodedHTMLEntity::span() should use
std::span::first()
Product: WebKit
Version: Other
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WebCore Misc.
Assignee: webkit-unassigned at lists.webkit.org
Reporter: ddkilzer at webkit.org
WebCore::DecodedHTMLEntity::span() should use std::span::first().
This code currently avoids bounds checking of `m_characters` when creating std::span:
```
constexpr std::span<const UChar> span() const { return { m_characters.data(), m_length }; }
```
Found by std::span clang static analysis checker under development.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20241022/e6b2a8b4/attachment.htm>
More information about the webkit-unassigned
mailing list