RESOLVED FIXED281919
WebCore::DecodedHTMLEntity::span() should use std::span::first()
https://bugs.webkit.org/show_bug.cgi?id=281919
Summary WebCore::DecodedHTMLEntity::span() should use std::span::first()
David Kilzer (:ddkilzer)
Reported 2024-10-22 14:22:56 PDT
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.
Attachments
Radar WebKit Bug Importer
Comment 1 2024-10-22 14:25:53 PDT
David Kilzer (:ddkilzer)
Comment 2 2024-10-22 14:32:15 PDT
EWS
Comment 3 2024-10-22 19:40:04 PDT
Committed 285583@main (b8b9ecf63b67): <https://commits.webkit.org/285583@main> Reviewed commits have been landed. Closing PR #35585 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.