Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f17044b41c9006fbcf0cb7b9075368aa703d268a
      
https://github.com/WebKit/WebKit/commit/f17044b41c9006fbcf0cb7b9075368aa703d268a
  Author: Gavin Phillips <[email protected]>
  Date:   2025-12-16 (Tue, 16 Dec 2025)

  Changed paths:
    M Source/WebCore/Modules/mediasource/SampleMap.cpp
    M Source/WebCore/Modules/mediasource/SampleMap.h
    M Source/WebCore/platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm

  Log Message:
  -----------
  ImageDecoderAVFObjC::createFrameImageAtIndex should ensure that the cursor is 
valid when rewinding to find earlier sample
https://bugs.webkit.org/show_bug.cgi?id=301185
rdar://162449335

Reviewed by Jer Noble.

ImageDecoderAVFObjC::createFrameImageAtIndex could go OOB when we search
for a decodeOrder frame which comes earlier than the first sync frame.
This change ensures that m_cursor always remains valid during this search.

* Source/WebCore/Modules/mediasource/SampleMap.cpp:
(WebCore::DecodeOrderSampleMap::findSyncSamplePriorToDecodeKey):
* Source/WebCore/Modules/mediasource/SampleMap.h:
* Source/WebCore/platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
(WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex):

Originally-landed-as: 301765.131@safari-7623-branch (db3be24f9f5b). 
rdar://166338064
Canonical link: https://commits.webkit.org/304558@main



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

Reply via email to