aboutsummaryrefslogtreecommitdiff
path: root/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_rand__util__posix.cc
diff options
context:
space:
mode:
Diffstat (limited to 'www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_rand__util__posix.cc')
-rw-r--r--www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_rand__util__posix.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_rand__util__posix.cc b/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_rand__util__posix.cc
new file mode 100644
index 000000000000..024aa1e97b2c
--- /dev/null
+++ b/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_rand__util__posix.cc
@@ -0,0 +1,13 @@
+--- base/allocator/partition_allocator/partition_alloc_base/rand_util_posix.cc.orig 2022-06-17 14:20:10 UTC
++++ base/allocator/partition_allocator/partition_alloc_base/rand_util_posix.cc
+@@ -88,6 +88,10 @@ void RandBytes(void* output, size_t output_length) {
+ return;
+ }
+ }
++#elif BUILDFLAG(IS_BSD)
++ if (getentropy(output, output_length) == 0) {
++ return;
++ }
+ #endif
+
+ // If the OS-specific mechanisms didn't work, fall through to reading from