projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50f4063
)
Reserve for unaligned buffer. The problem was "pointed out" be HPUX64
author
Andy Polyakov
<appro@openssl.org>
Sat, 24 Jan 2004 15:04:38 +0000
(15:04 +0000)
committer
Andy Polyakov
<appro@openssl.org>
Sat, 24 Jan 2004 15:04:38 +0000
(15:04 +0000)
gcc, which failed to compile it with "not aligned" at higher optimization
levels.
fips/rand/fips_rand.c
patch
|
blob
|
history
diff --git
a/fips/rand/fips_rand.c
b/fips/rand/fips_rand.c
index 6e1fed07ccb3822433809fba32ca19abf94376ff..0ddbff6b100284f6fd86a6552c9538c407378aa9 100644
(file)
--- a/
fips/rand/fips_rand.c
+++ b/
fips/rand/fips_rand.c
@@
-127,8
+127,8
@@
static void fips_gettime(unsigned char buf[8])
}
gettimeofday(&tv,NULL);
assert(sizeof(long) == 4);
-
*(long *)&buf[0]=tv.tv_sec
;
-
*(long *)&buf[4]=tv.tv_usec
;
+
memcpy (&buf[0],&tv.tv_sec,4)
;
+
memcpy (&buf[4],&tv.tv_usec,4)
;
#ifndef GETPID_IS_MEANINGLESS
/* we mix in the PID to ensure that after a fork the children don't give