WebKit Bugzilla
Attachment 341270 Details for
Bug 185611
: [GTK][WPE]: Avoid using uninitialized launchOptions in getLaunchOptions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
[GTK][WPE]: Avoid using uninitialized launchOptions in getLaunchOptions
GTKWPE-Avoid-using-uninitialized-launchOptions-in-.patch (text/plain), 3.51 KB, created by
Thibault Saunier
on 2018-05-25 04:24:35 PDT
(
hide
)
Description:
[GTK][WPE]: Avoid using uninitialized launchOptions in getLaunchOptions
Filename:
MIME Type:
Creator:
Thibault Saunier
Created:
2018-05-25 04:24:35 PDT
Size:
3.51 KB
patch
obsolete
>From 1ba3f21ace53e94976fd94321b04601536b0fd19 Mon Sep 17 00:00:00 2001 >From: Thibault Saunier <tsaunier@igalia.com> >Date: Mon, 14 May 2018 10:18:02 -0400 >Subject: [PATCH xserver] [GTK][WPE]: Avoid using uninitialized launchOptions > in getLaunchOptions > >Otherwise we might get segfault > >https://bugs.webkit.org/show_bug.cgi?id=185611 >--- > Source/WebKit/ChangeLog | 17 +++++++++++++++++ > Source/WebKit/UIProcess/ChildProcessProxy.cpp | 2 ++ > .../WebKit/UIProcess/Launcher/ProcessLauncher.h | 3 ++- > .../UIProcess/Plugins/PluginProcessProxy.cpp | 2 +- > 4 files changed, 22 insertions(+), 2 deletions(-) > >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index d8bab34f1fb..39c8ee2bc61 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,20 @@ >+2018-05-14 Thibault Saunier <tsaunier@igalia.com> >+ >+ [GTK][WPE]: Avoid using uninitialized launchOptions in getLaunchOptions >+ https://bugs.webkit.org/show_bug.cgi?id=185611 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Otherwise we might segfault. >+ And make sure to initialize `LaunchOptions::processType` to a meaningful value in >+ case. >+ >+ * UIProcess/ChildProcessProxy.cpp: >+ (WebKit::ChildProcessProxy::getLaunchOptions): >+ * UIProcess/Launcher/ProcessLauncher.h: >+ * UIProcess/Plugins/PluginProcessProxy.cpp: >+ (WebKit::PluginProcessProxy::getLaunchOptions): >+ > 2018-05-24 Dan Bernstein <mitz@apple.com> > > ProcessLauncherMac.mm contains a couple of meaningless #ifndef directives >diff --git a/Source/WebKit/UIProcess/ChildProcessProxy.cpp b/Source/WebKit/UIProcess/ChildProcessProxy.cpp >index bdff583d3b1..4559c4b82a9 100644 >--- a/Source/WebKit/UIProcess/ChildProcessProxy.cpp >+++ b/Source/WebKit/UIProcess/ChildProcessProxy.cpp >@@ -75,6 +75,8 @@ void ChildProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchO > case ProcessLauncher::ProcessType::Storage: > varname = "STORAGE_PROCESS_CMD_PREFIX"; > break; >+ case ProcessLauncher::ProcessType::None: >+ ASSERT_NOT_REACHED(); > } > const char* processCmdPrefix = getenv(varname); > if (processCmdPrefix && *processCmdPrefix) >diff --git a/Source/WebKit/UIProcess/Launcher/ProcessLauncher.h b/Source/WebKit/UIProcess/Launcher/ProcessLauncher.h >index 3ababbcceed..b06ca3fe8b4 100644 >--- a/Source/WebKit/UIProcess/Launcher/ProcessLauncher.h >+++ b/Source/WebKit/UIProcess/Launcher/ProcessLauncher.h >@@ -58,10 +58,11 @@ public: > #endif > Network, > Storage, >+ None, > }; > > struct LaunchOptions { >- ProcessType processType; >+ ProcessType processType = { ProcessType::None }; > WebCore::ProcessIdentifier processIdentifier; > HashMap<String, String> extraInitializationData; > bool nonValidInjectedCodeAllowed { false }; >diff --git a/Source/WebKit/UIProcess/Plugins/PluginProcessProxy.cpp b/Source/WebKit/UIProcess/Plugins/PluginProcessProxy.cpp >index 7a39f5b1aea..326ae2a749e 100644 >--- a/Source/WebKit/UIProcess/Plugins/PluginProcessProxy.cpp >+++ b/Source/WebKit/UIProcess/Plugins/PluginProcessProxy.cpp >@@ -88,8 +88,8 @@ PluginProcessProxy::~PluginProcessProxy() > > void PluginProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchOptions) > { >- ChildProcessProxy::getLaunchOptions(launchOptions); > platformGetLaunchOptions(launchOptions, m_pluginProcessAttributes); >+ ChildProcessProxy::getLaunchOptions(launchOptions); > } > > void PluginProcessProxy::processWillShutDown(IPC::Connection& connection) >-- >2.17.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185611
:
340313
|
340321
|
340429
|
340488
|
341270
|
341289
|
342812