Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 456e79b9bc5868a64f5ab86d3a7de7e6b0516bb7
      
https://github.com/WebKit/WebKit/commit/456e79b9bc5868a64f5ab86d3a7de7e6b0516bb7
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-08-27 (Thu, 27 Aug 2026)

  Changed paths:
    M Source/WebCore/html/HTMLMediaElement.cpp

  Log Message:
  -----------
  trackIndexCompare uses int subtraction that can overflow
https://bugs.webkit.org/show_bug.cgi?id=322679

Reviewed by Ryosuke Niwa.

trackIndexCompare computed `a->trackIndex() - b->trackIndex() < 0` as a
strict-weak-ordering predicate for std::ranges::sort. Subtracting two ints
can overflow, which would flip the comparison sign and violate the sort's
ordering invariant. Compare the indices directly instead.

* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::trackIndexCompare):

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



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

Reply via email to