Bug 315170

Summary: [GStreamer] Clang 22 reports unsafe buffer warnings in GStreamerWebRTCCommon.cpp
Product: WebKit Reporter: Adrian Perez <aperez>
Component: MediaAssignee: Adrian Perez <aperez>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   

Adrian Perez
Reported 2026-05-20 01:44:53 PDT
/sdk/webkit/Source/WebCore/platform/mediastream/gstreamer/GStreamerWebRTCCommon.cpp:51:24: error: unsafe buffer access [-Werror,-Wunsafe-buffer-usage] 51 | auto intSpec = G_PARAM_SPEC_INT(ptSpec); | ^~~~~~~~~~~~~~~~~~~~~~~~ /jhbuild/install/include/glib-2.0/gobject/gparamspecs.h:126:82: note: expanded from macro 'G_PARAM_SPEC_INT' 126 | #define G_PARAM_SPEC_INT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT, GParamSpecInt)) | ^~~~~~~~~~~~~~~~ /jhbuild/install/include/glib-2.0/gobject/gparamspecs.h:110:31: note: expanded from macro 'G_TYPE_PARAM_INT' 110 | #define G_TYPE_PARAM_INT (g_param_spec_types[3]) | ^~~~~~~~~~~~~~~~~~ /sdk/webkit/Source/WebCore/platform/mediastream/gstreamer/GStreamerWebRTCCommon.cpp:51:24: note: pass -fsafe-buffer-usage-suggestions to receive code hardening suggestions /jhbuild/install/include/glib-2.0/gobject/gparamspecs.h:126:82: note: expanded from macro 'G_PARAM_SPEC_INT' 126 | #define G_PARAM_SPEC_INT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT, GParamSpecInt)) | ^ /jhbuild/install/include/glib-2.0/gobject/gparamspecs.h:110:31: note: expanded from macro 'G_TYPE_PARAM_INT' 110 | #define G_TYPE_PARAM_INT (g_param_spec_types[3]) | ^ In file included from /sdk/webkit/WebKitBuild/WPE/Debug/WebCore/DerivedSources/unified-sources/UnifiedSource-platform-80.cpp:7: /sdk/webkit/Source/WebCore/platform/mediastream/gstreamer/GStreamerWebRTCCommon.cpp:61:25: error: unsafe buffer access [-Werror,-Wunsafe-buffer-usage] 61 | auto uintSpec = G_PARAM_SPEC_UINT(ptSpec); | ^~~~~~~~~~~~~~~~~~~~~~~~~ /jhbuild/install/include/glib-2.0/gobject/gparamspecs.h:149:82: note: expanded from macro 'G_PARAM_SPEC_UINT' 149 | #define G_PARAM_SPEC_UINT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT, GParamSpecUInt)) | ^~~~~~~~~~~~~~~~~ /jhbuild/install/include/glib-2.0/gobject/gparamspecs.h:133:32: note: expanded from macro 'G_TYPE_PARAM_UINT' 133 | #define G_TYPE_PARAM_UINT (g_param_spec_types[4]) | ^~~~~~~~~~~~~~~~~~ /sdk/webkit/Source/WebCore/platform/mediastream/gstreamer/GStreamerWebRTCCommon.cpp:61:25: note: pass -fsafe-buffer-usage-suggestions to receive code hardening suggestions /jhbuild/install/include/glib-2.0/gobject/gparamspecs.h:149:82: note: expanded from macro 'G_PARAM_SPEC_UINT' 149 | #define G_PARAM_SPEC_UINT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT, GParamSpecUInt)) | ^ /jhbuild/install/include/glib-2.0/gobject/gparamspecs.h:133:32: note: expanded from macro 'G_TYPE_PARAM_UINT' 133 | #define G_TYPE_PARAM_UINT (g_param_spec_types[4]) | ^
Attachments
EWS
Comment 1 2026-05-20 01:55:26 PDT
Committed 313559@main (de81a9b394f6): <https://commits.webkit.org/313559@main> Reviewed commits have been landed. Closing PR #65266 and removing active labels.
Radar WebKit Bug Importer
Comment 2 2026-05-20 01:56:12 PDT
Note You need to log in before you can comment on or make changes to this bug.