Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 21f98a1bf7b8e1dc5837da7732ae467826cbf627
      
https://github.com/WebKit/WebKit/commit/21f98a1bf7b8e1dc5837da7732ae467826cbf627
  Author: Claudio Saavedra <[email protected]>
  Date:   2026-03-20 (Fri, 20 Mar 2026)

  Changed paths:
    M Source/WTF/wtf/glib/GSpanExtras.h
    M Source/WebCore/Modules/mediastream/gstreamer/GStreamerWebRTCUtils.cpp

  Log Message:
  -----------
  [GStreamer] Drop unsafe buffer usage from GStreamerWebRTCUtils
https://bugs.webkit.org/show_bug.cgi?id=310282

Reviewed by Philippe Normand.

Add a std::span constructor for GArray so that the GArray's provided
by GStreamer can be used instead of unsafe iteration through the GArray
API.

Replace EVP_EC_gen() macro usage with EVP_PKEY_Q_keygen() directly,
to avoid unnecessary call to strstr(), fixing this way:

error: function 'strstr' is unsafe [-Werror,-Wunsafe-buffer-usage-in-libc-call]
   421 |         privateKey.reset(EVP_PKEY_Q_keygen(__null, __null, "EC", (char 
*)(strstr("prime256v1", ""))));

* Source/WTF/wtf/glib/GSpanExtras.h:
(WTF::std::span<T>span):
* Source/WebCore/Modules/mediastream/gstreamer/GStreamerWebRTCUtils.cpp:
(WebCore::generateCertificate):
(WebCore::forEachTransceiver):
(WebCore::SDPStringBuilder::SDPStringBuilder):

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



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

Reply via email to