From e8b3e0cdcea319abf82639edb5e074ff94c4d66c Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 8 Sep 2017 10:18:37 -0700 Subject: Fix one-second spin in fx_random.cpp Take seed generation logic from base's address_space_randomization.cc. One small tweak is to avoid the bottom three bits of a stack address and invert, to make leaking ASLR more difficult along the lines of the freelist masking in base's partition allocator. Another tweak is to mix in some more time-based information. Another tweak is to add in the times called so that rapid successive calls return different results. Bug: pdfium:891 Change-Id: I14238da15cee9c8d4ca72d79e4f7fbb26997c619 Reviewed-on: https://pdfium-review.googlesource.com/13490 Reviewed-by: Henrique Nakashima Commit-Queue: Tom Sepez --- BUILD.gn | 1 + 1 file changed, 1 insertion(+) (limited to 'BUILD.gn') diff --git a/BUILD.gn b/BUILD.gn index deaa706b8d..ca4c9ee1a5 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1932,6 +1932,7 @@ test("pdfium_unittests") { "core/fxcrt/fx_coordinates_unittest.cpp", "core/fxcrt/fx_extension_unittest.cpp", "core/fxcrt/fx_memory_unittest.cpp", + "core/fxcrt/fx_random_unittest.cpp", "core/fxcrt/fx_string_unittest.cpp", "core/fxcrt/fx_system_unittest.cpp", "core/fxge/dib/cstretchengine_unittest.cpp", -- cgit v1.2.3