From 34bcf562917a1b5af40c140aac2285f9894d3b73 Mon Sep 17 00:00:00 2001 From: william Date: Sat, 19 Apr 2014 14:42:48 -0700 Subject: ASLR behaves differently on different platforms; try to maximize our chances of benefiting from it --- src/openssl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/openssl.c b/src/openssl.c index 4a21c69..624f6d5 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -4063,14 +4063,14 @@ error:; pid_t pid; struct rusage ru; struct utsname un; - int (*fn)(); + uintptr_t aslr; } junk; gettimeofday(&junk.tv, NULL); junk.pid = getpid(); getrusage(RUSAGE_SELF, &junk.ru); uname(&junk.un); - junk.fn = &stir; + junk.aslr = (uintptr_t)&strcpy ^ (uintptr_t)&stir; RAND_add(&junk, sizeof junk, 0.1); -- cgit v1.2.3-59-g8ed1b