Sophie

Sophie

distrib > Mageia > 8 > i586 > by-pkgid > 449fc9b6546474a81569af1274dce0b5 > files > 35

chromium-browser-stable-99.0.4844.51-1.mga8.src.rpm

--- patch99/sandbox/linux/services/credentials.cc	2022-02-24 01:51:47.000000000 +0100
+++ patch99/sandbox/linux/services/credentials.cc.fix_variable_size	2022-02-26 14:24:19.321968703 +0100
@@ -11,6 +11,7 @@
 #include <stddef.h>
 #include <stdint.h>
 #include <stdio.h>
+#include <string.h>
 #include <sys/syscall.h>
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -100,7 +101,10 @@ bool ChrootToSafeEmptyDir() {
   // TODO(crbug.com/1247458) Broken in MSan builds after LLVM f1bb30a4956f.
   clone_flags |= CLONE_VM | CLONE_VFORK | CLONE_SETTLS;
 
-  char tls_buf[PTHREAD_STACK_MIN] = {0};
+  // PTHREAD_STACK_MIN can be dynamic in glibc2.34+, so it is not possible to
+  // zeroify tls_buf assigning { 0 }
+  char tls_buf[PTHREAD_STACK_MIN];
+  memset(tls_buf, 0, PTHREAD_STACK_MIN);
   tls = tls_buf;
 #endif