Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5d2a8a719f04ed26b8ca5a77bda4054891bffd48
      
https://github.com/WebKit/WebKit/commit/5d2a8a719f04ed26b8ca5a77bda4054891bffd48
  Author: Chris Dumez <[email protected]>
  Date:   2026-03-26 (Thu, 26 Mar 2026)

  Changed paths:
    M Source/WebCore/platform/SharedBuffer.h
    M Tools/TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp

  Log Message:
  -----------
  Fix SharedBuffer:isSpanWithinBounds()
https://bugs.webkit.org/show_bug.cgi?id=310769

Reviewed by Kimmo Kinnunen.

The function only checked that otherSpan.end() falls within
`[thisSpan.begin(), thisSpan.end()]``. It never checks that
`otherSpan.begin() >= thisSpan.begin()`. A span that starts before the
buffer but ends within it would incorrectly return true.

Test: Tools/TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp

* Source/WebCore/platform/SharedBuffer.h:
(WebCore::SharedBuffer::isSpanWithinBounds const):
* Tools/TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp:
(TestWebKitAPI::TEST_F(FragmentedSharedBufferTest, isSpanWithinBounds)):

Canonical link: https://commits.webkit.org/309975@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to