[webkit-changes] [WebKit/WebKit] a83ee5: WTF: Fix unsigned overflows/underflows in string c...

Rose noreply at github.com
Tue May 9 08:56:35 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a83ee572364b9ae35c05e5eb6a36d502515d5c22
      https://github.com/WebKit/WebKit/commit/a83ee572364b9ae35c05e5eb6a36d502515d5c22
  Author: Rose <83477269+AtariDreams at users.noreply.github.com>
  Date:   2023-05-09 (Tue, 09 May 2023)

  Changed paths:
    M Source/WTF/wtf/text/IntegerToStringConversion.h

  Log Message:
  -----------
  WTF: Fix unsigned overflows/underflows in string conversion
https://bugs.webkit.org/show_bug.cgi?id=256164

Reviewed by David Kilzer.

Although we check that integer is less than 0 before negating it, the
UBSanitizer keeps tripping up at this section. The proper fix would be
to use std::make_unsigned_t<IntegerType> here, to convert the variable
to its unsigned equivalent.

* Source/WTF/wtf/text/IntegerToStringConversion.h:
  (writeIntegerToBuffer): Cast to unsigned.

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




More information about the webkit-changes mailing list