Bug 309980
| Summary: | [GStreamer] clang-22 unsafe-buffer-usage-in-unique-ptr-array-access warnings | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Philippe Normand <philn> |
| Component: | Platform | Assignee: | Philippe Normand <philn> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Philippe Normand
In file included from /var/home/phil/WebKit/WebKitBuild/GTK/Release/WebCore/DerivedSources/unified-sources/UnifiedSource-3c72abbe-21.cpp:8:
/var/home/phil/WebKit/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;
| ^~~~~~~~~~~~~~~~
/var/home/phil/WebKit/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;
| ^~~~~~~~~~~~~~~~
/var/home/phil/WebKit/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];
| ^~~~~~~~~~~~~~~~
/var/home/phil/WebKit/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];
| ^~~~~~~~~~~~~~~~
4 warnings generated.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Philippe Normand
Pull request: https://github.com/WebKit/WebKit/pull/60655
EWS
Committed 309309@main (0816379351c3): <https://commits.webkit.org/309309@main>
Reviewed commits have been landed. Closing PR #60655 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/172645694>