diff options
author | william <william@25tandclement.com> | 2014-04-19 14:42:48 -0700 |
---|---|---|
committer | william <william@25tandclement.com> | 2014-04-19 14:42:48 -0700 |
commit | 34bcf562917a1b5af40c140aac2285f9894d3b73 (patch) | |
tree | 21c91ad6c6ecc5bb52cc27fd809c1ecc52d53556 | |
parent | b549aa3ca66b3e823250a9c5bd027056e6c51c9b (diff) | |
download | luaossl-34bcf562917a1b5af40c140aac2285f9894d3b73.tar.gz luaossl-34bcf562917a1b5af40c140aac2285f9894d3b73.tar.bz2 luaossl-34bcf562917a1b5af40c140aac2285f9894d3b73.zip |
ASLR behaves differently on different platforms; try to maximize our chances of benefiting from it
-rw-r--r-- | src/openssl.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |