<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>315548</bug_id>
          
          <creation_ts>2026-05-25 23:56:03 -0700</creation_ts>
          <short_desc>[GStreamer][2.52.x] Unsafe buffer usage warnings with Clang 22 in FFTFrameGStreamer.cpp</short_desc>
          <delta_ts>2026-05-26 00:28:11 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Media</component>
          <version>Other</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=309980</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Adrian Perez">aperez</reporter>
          <assigned_to name="Adrian Perez">aperez</assigned_to>
          <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2214033</commentid>
    <comment_count>0</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2026-05-25 23:56:03 -0700</bug_when>
    <thetext>Building WebKitGTK 2.52.2 (or from the tip of the webkitglib/2.52 branch) with Clang 22.1.5 produces the following warnings:

/home/aperez/devel/WebKit-2.52/Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:97:23: warning: direct access using operator[] on std::unique_ptr&lt;T[]&gt; is unsafe due to lack of bounds checking [-Wunsafe-buffer-usage-in-unique-ptr-array-access]
   97 |         imagData[i] = m_complexData[i].i;
      |                       ^~~~~~~~~~~~~~~~
/home/aperez/devel/WebKit-2.52/Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:98:23: warning: direct access using operator[] on std::unique_ptr&lt;T[]&gt; is unsafe due to lack of bounds checking [-Wunsafe-buffer-usage-in-unique-ptr-array-access]
   98 |         realData[i] = m_complexData[i].r;
      |                       ^~~~~~~~~~~~~~~~
/home/aperez/devel/WebKit-2.52/Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:108:9: warning: direct access using operator[] on std::unique_ptr&lt;T[]&gt; is unsafe due to lack of bounds checking [-Wunsafe-buffer-usage-in-unique-ptr-array-access]
  108 |         m_complexData[i].i = imagData[i];
      |         ^~~~~~~~~~~~~~~~                               
/home/aperez/devel/WebKit-2.52/Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:109:9: warning: direct access using operator[] on std::unique_ptr&lt;T[]&gt; is unsafe due to lack of bounds checking [-Wunsafe-buffer-usage-in-unique-ptr-array-access]
  109 |         m_complexData[i].r = realData[i];
      |         ^~~~~~~~~~~~~~~~</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2214038</commentid>
    <comment_count>1</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2026-05-26 00:13:26 -0700</bug_when>
    <thetext>This was already fixed in the “main” branch in revision 309309@main -- we can just backport the fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2214042</commentid>
    <comment_count>2</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2026-05-26 00:28:00 -0700</bug_when>
    <thetext>(In reply to Adrian Perez from comment #1)
&gt; This was already fixed in the “main” branch in revision 309309@main -- we
&gt; can just backport the fix.

Backport done in https://commits.webkit.org/305877.679@webkitglib/2.52</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2214043</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-05-26 00:28:11 -0700</bug_when>
    <thetext>&lt;rdar://problem/177926019&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>