From c7ef8530bf581bc3dfcdf95f211d9bb013ebd854 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Mon, 22 Apr 2024 14:31:28 -0400 Subject: [PATCH] LibWebView: Explicitly inititalize the ProcessHandle PID Avoids UB if the PID is read from without otherwise being initialized. --- Userland/Libraries/LibWebView/ProcessHandle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWebView/ProcessHandle.h b/Userland/Libraries/LibWebView/ProcessHandle.h index 320306248bf..638d21bb1da 100644 --- a/Userland/Libraries/LibWebView/ProcessHandle.h +++ b/Userland/Libraries/LibWebView/ProcessHandle.h @@ -13,7 +13,7 @@ namespace WebView { struct ProcessHandle { // FIXME: Use mach_port_t on macOS/Hurd and HANDLE on Windows. - pid_t pid; + pid_t pid { -1 }; }; }