From fc610b7c7ae11bdde828a02406543d0c70fac0d0 Mon Sep 17 00:00:00 2001 From: Sandboxed API Team Date: Wed, 3 Jan 2024 01:48:04 -0800 Subject: [PATCH] Fix UB caused by uninitialized value. PiperOrigin-RevId: 595332410 Change-Id: I88ca3e826853b8731e2c9a0c8b327cf13aeca046 --- sandboxed_api/sandbox2/testcases/starve.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sandboxed_api/sandbox2/testcases/starve.cc b/sandboxed_api/sandbox2/testcases/starve.cc index 6903c0a..5295e76 100644 --- a/sandboxed_api/sandbox2/testcases/starve.cc +++ b/sandboxed_api/sandbox2/testcases/starve.cc @@ -40,7 +40,7 @@ int ChildFunc(void*) { int main() { for (int i = 0; i < kProcesses; ++i) { - int p[2]; + int p[2] = {0, 0}; char c = ' '; pipe(p); g_pids[i] = fork();