Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fd0db67fd877c487e824538cd56eb569dcbdcecb
      
https://github.com/WebKit/WebKit/commit/fd0db67fd877c487e824538cd56eb569dcbdcecb
  Author: Kristian Monsen <[email protected]>
  Date:   2026-04-26 (Sun, 26 Apr 2026)

  Changed paths:
    A LayoutTests/ipc/register-mdns-name-unpaired-surrogate-crash-expected.txt
    A LayoutTests/ipc/register-mdns-name-unpaired-surrogate-crash.html
    M Source/WTF/wtf/text/StringImpl.h

  Log Message:
  -----------
  [WTF] Fix crash in utf8ForCharacters when string ends with unpaired surrogate
https://bugs.webkit.org/show_bug.cgi?id=313333
rdar://174924192

Reviewed by Yusuke Suzuki.

Replace grow with resize so the buffer is set to exactly characters.size() * 3 
bytes, satisfying the assert regardless of what simdutf estimated.

Test: ipc/register-mdns-name-unpaired-surrogate-crash.html

* LayoutTests/ipc/register-mdns-name-unpaired-surrogate-crash-expected.txt: 
Added.
* LayoutTests/ipc/register-mdns-name-unpaired-surrogate-crash.html: Added.
* Source/WTF/wtf/text/StringImpl.h:
(WTF::StringImpl::tryGetUTF8ForCharacters):

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



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

Reply via email to