Bug 300332

Summary: WebKitWebExtension build failed on Clang
Product: WebKit Reporter: Jamie Murphy <jmurphy>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Jamie Murphy
Reported 2025-10-07 10:39:38 PDT
> /host/home/jamie/Projects/Igalia/WebKit/Source/WebKit/UIProcess/Extensions/gtk/WebExtensionGtk.cpp:57:10: error: '__suffix' is an unsafe pointer used for buffer access [-Werror,-Wunsafe-buffer-usage] > 57 | if (!g_str_has_suffix(g_strdup(baseURL.get()), "/")) > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > /usr/include/glib-2.0/glib/gstrfuncs.h:187:27: note: expanded from macro 'g_str_has_suffix' > 187 | const char * const __suffix = (SUFFIX); \ > | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ > /host/home/jamie/Projects/Igalia/WebKit/Source/WebKit/UIProcess/Extensions/gtk/WebExtensionGtk.cpp:57:10: note: used in pointer arithmetic here > 57 | if (!g_str_has_suffix(g_strdup(baseURL.get()), "/")) > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > /usr/include/glib-2.0/glib/gstrfuncs.h:198:34: note: expanded from macro 'g_str_has_suffix' > 198 | _G_STR_NONNULL (__suffix), \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~ > /usr/include/glib-2.0/glib/gstrfuncs.h:157:28: note: expanded from macro '_G_STR_NONNULL' > 157 | #define _G_STR_NONNULL(x) ((x) + !(x)) > | ^~~ > /host/home/jamie/Projects/Igalia/WebKit/Source/WebKit/UIProcess/Extensions/gtk/WebExtensionGtk.cpp:57:10: note: used in pointer arithmetic here > 57 | if (!g_str_has_suffix(g_strdup(baseURL.get()), "/")) > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > /usr/include/glib-2.0/glib/gstrfuncs.h:195:49: note: expanded from macro 'g_str_has_suffix' > 195 | const size_t __suffix_len = strlen (_G_STR_NONNULL (__suffix)); \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~ > /usr/include/glib-2.0/glib/gstrfuncs.h:157:28: note: expanded from macro '_G_STR_NONNULL' > 157 | #define _G_STR_NONNULL(x) ((x) + !(x))
Attachments
Jamie Murphy
Comment 1 2025-10-07 10:45:17 PDT
EWS
Comment 2 2025-10-07 13:14:52 PDT
Committed 301160@main (b523d2476326): <https://commits.webkit.org/301160@main> Reviewed commits have been landed. Closing PR #51953 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.