Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 06c39748622d2adf79c708d4f58a442b35f4f886
      
https://github.com/WebKit/WebKit/commit/06c39748622d2adf79c708d4f58a442b35f4f886
  Author: Adrian Perez de Castro <[email protected]>
  Date:   2026-09-23 (Wed, 23 Sep 2026)

  Changed paths:
    M Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp

  Log Message:
  -----------
  [GTK][WPE] Reduce use of WTF_ALLOW_UNSAFE_BUFFER_USAGE in PNGImageDecoder
https://bugs.webkit.org/show_bug.cgi?id=324990

Reviewed by Justin Michaud.

Narrow down the locations containing unsafe buffers usage in the PNG
image decoder, modernizing the code to use std::array and std::span more
extensively along with existing helper functions that operate on spans,
and a few helpers defined specifically for PNG chunk data.

No new tests needed, convered by existing tests.

* Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:
(WebCore::PNGImageDecoder::rowAvailable):
(WebCore::PNGImageDecoder::frameRowAvailable):
(WebCore::consumePNGUnsignedInt):
(WebCore::consumePNGUnsignedShort):
(WebCore::consumePNGUnsignedByte):
(WebCore::chunkDataSpan):
(WebCore::mutableChunkDataSpan):
(WebCore::PNGImageDecoder::readChunks):
(WebCore::PNGImageDecoder::beginFrame):
(WebCore::PNGImageDecoder::processingStart):
(WebCore::PNGImageDecoder::processingFinish):

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



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

Reply via email to