Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8ef26af51db61bc6eeedf8ee0e4518fa883b3fef
      
https://github.com/WebKit/WebKit/commit/8ef26af51db61bc6eeedf8ee0e4518fa883b3fef
  Author: Adrian Perez de Castro <[email protected]>
  Date:   2026-10-14 (Wed, 14 Oct 2026)

  Changed paths:
    M Source/WTF/wtf/glib/GSpanExtras.cpp
    M Source/WTF/wtf/glib/GSpanExtras.h
    M Source/WebKit/WPEPlatform/CMakeLists.txt
    M Source/WebKit/WPEPlatform/wpe/WPEBufferDMABuf.cpp
    M Source/WebKit/WPEPlatform/wpe/WPECursorTheme.cpp
    M Source/WebKit/WPEPlatform/wpe/WPEDRMDevice.cpp
    M Source/WebKit/WPEPlatform/wpe/WPEDisplay.cpp
    M Source/WebKit/WPEPlatform/wpe/WPEExtensions.cpp
    M Source/WebKit/WPEPlatform/wpe/WPEKeyUnicode.cpp
    M Source/WebKit/WPEPlatform/wpe/WPEKeymapXKB.cpp
    M Source/WebKit/WPEPlatform/wpe/WPEScreen.cpp
    M Source/WebKit/WPEPlatform/wpe/WPESettings.cpp
    M Source/WebKit/WPEPlatform/wpe/drm/CMakeLists.txt
    M Source/WebKit/WPEPlatform/wpe/drm/WPEDRM.cpp
    M Source/WebKit/WPEPlatform/wpe/drm/WPEDRMCursor.cpp
    M Source/WebKit/WPEPlatform/wpe/drm/WPEDisplayDRM.cpp
    M Source/WebKit/WPEPlatform/wpe/drm/WPEViewDRM.cpp
    M Source/WebKit/WPEPlatform/wpe/headless/CMakeLists.txt
    M Source/WebKit/WPEPlatform/wpe/wayland/CMakeLists.txt
    M Source/WebKit/WPEPlatform/wpe/wayland/WPEClipboardWayland.cpp
    M Source/WebKit/WPEPlatform/wpe/wayland/WPEDisplayWayland.cpp
    M Source/WebKit/WPEPlatform/wpe/wayland/WPEInputMethodContextWaylandV1.cpp
    M Source/WebKit/WPEPlatform/wpe/wayland/WPEInputMethodContextWaylandV3.cpp
    M Source/WebKit/WPEPlatform/wpe/wayland/WPEToplevelWayland.cpp
    M Source/WebKit/WPEPlatform/wpe/wayland/WPEViewWayland.cpp

  Log Message:
  -----------
  [WPEPlatform] Build with -Wunsafe-buffer-usage
https://bugs.webkit.org/show_bug.cgi?id=327106

Reviewed by Claudio Saavedra.

Most of the locations that caused unsafe buffer usage warnings have been
rewritten to use std::span() and the span-adjacent helpers from WTF,
including the ones from aimed at GLib functionality. In that vein, two
more helper functions are added to GSpanExtras.{h,cpp} to deal with
GKeyFile.

A number of uses of g_build_filename() have been replaced with
gBuildFilename() in WPECursorTheme.cpp, which also resulted in simpler
and clearer code.

Reading of environment variables has been updated to use UTF8CStringView
rather than string manipulation functions from the C library.

The handwritten binary searches in WPEKeyUnicode.cpp have been rewritten
to use std::ranges::lower_bound(), which is included in the C++ library
and also uses the binary search algorithm, resulting in code
simplification.

In some cases the WTF_ALLOW_UNSAFE_BUFFER_USAGE_{BEGIN,END} macros are
used to suppress warnings in some code segments, which may be refactored
later on.

No new tests, no change in functionality.

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



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

Reply via email to