Bug 303623
| Summary: | [GLib] Crash in SleepDisablerGLib::acquireInhibitor() when g_get_prgname() returns NULL | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Kdwk <kdwkleung> |
| Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | aperez, bugs-noreply |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | PC | ||
| OS: | Linux | ||
Kdwk
According to the GLib API documentation, g_get_prgname() can return NULL (https://docs.gtk.org/glib/func.get_prgname.html). In SleepDisablerGLib.cpp:95, the result of this function is passed directly into g_variant_new(), resulting in assert string != NULL to fail and crash the WebProcess. Instead, a fallback of empty string ("") can be provided.
Steps to reproduce:
1. In WebKit Dev Container, use JHBuild to build WebKit and Epiphany, then run the JHBuild Epiphany
2. Epiphany should now be running in a non-sandboxed environment, causing shouldUsePortal() (SleepDisablerGLib.cpp:89) to return false
3. Visit https://browserbench.org/Speedometer3.1/, press "Start Test"
4. Crash
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Adrian Perez
Pull request: https://github.com/WebKit/WebKit/pull/54921
EWS
Committed 304162@main (1876825e173c): <https://commits.webkit.org/304162@main>
Reviewed commits have been landed. Closing PR #54921 and removing active labels.