RESOLVED FIXED315548
[GStreamer][2.52.x] Unsafe buffer usage warnings with Clang 22 in FFTFrameGStreamer.cpp
https://bugs.webkit.org/show_bug.cgi?id=315548
Summary [GStreamer][2.52.x] Unsafe buffer usage warnings with Clang 22 in FFTFrameGSt...
Adrian Perez
Reported 2026-05-25 23:56:03 PDT
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<T[]> 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<T[]> 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<T[]> 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<T[]> is unsafe due to lack of bounds checking [-Wunsafe-buffer-usage-in-unique-ptr-array-access] 109 | m_complexData[i].r = realData[i]; | ^~~~~~~~~~~~~~~~
Attachments
Adrian Perez
Comment 1 2026-05-26 00:13:26 PDT
This was already fixed in the “main” branch in revision 309309@main -- we can just backport the fix.
Adrian Perez
Comment 2 2026-05-26 00:28:00 PDT
(In reply to Adrian Perez from comment #1) > This was already fixed in the “main” branch in revision 309309@main -- we > can just backport the fix. Backport done in https://commits.webkit.org/305877.679@webkitglib/2.52
Radar WebKit Bug Importer
Comment 3 2026-05-26 00:28:11 PDT
Note You need to log in before you can comment on or make changes to this bug.