From: drh Date: Fri, 6 Jan 2006 14:46:46 +0000 (+0000) Subject: Fix an alignment problem in the sqlite3OsRandomSeed(). Ticket #1584. (CVS 2872) X-Git-Tag: version-3.6.10~3295 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0739723d7628e4830b9d1b5ef1c3e5df78bfa622;p=thirdparty%2Fsqlite.git Fix an alignment problem in the sqlite3OsRandomSeed(). Ticket #1584. (CVS 2872) FossilOrigin-Name: 373b56f0048fd6a1946a97acfcca40fd12f7d572 --- diff --git a/manifest b/manifest index d8eb85b4de..0be78320db 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Remove\svestigial\sfile:\scrashtest1.c\s(CVS\s2871) -D 2006-01-06T14:41:54 +C Fix\san\salignment\sproblem\sin\sthe\ssqlite3OsRandomSeed().\s\sTicket\s#1584.\s(CVS\s2872) +D 2006-01-06T14:46:47 F Makefile.in c79fbdaa264c6afcd435f2fb492551de5a8cf80d F Makefile.linux-gcc aee18d8a05546dcf1888bd4547e442008a49a092 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 @@ -55,7 +55,7 @@ F src/os.h 6e61d5e901dfec761660707e892890f6760b5e63 F src/os_common.h 78bcc34dded9b625b3c16d072b7e5b76d075a674 F src/os_test.c 49833426101f99aee4bb5f6a44b7c4b2029fda1c F src/os_test.h 903c93554c23d88f34f667f1979e4a1cee792af3 -F src/os_unix.c d220bf3721357581214f261f8c6028060930177d +F src/os_unix.c 1ade7cd84c6f18dd2ceb98000ea1e9bdcac256ff F src/os_unix.h 5768d56d28240d3fe4537fac08cc85e4fb52279e F src/os_win.c 3239b124d2400ed30d213053df43dc29405d018f F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b @@ -335,7 +335,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513 -P 2529c2e11fa1d345ec61f647e4f6fae20a7133d6 -R 9f9ead22d0bda9c720999a0d4a57571c +P 6676c7031d81202ad702142ecf9e64f14d94d968 +R 1b60a9ed7b0ca6bc19ad7d05130da53f U drh -Z 4e702f097766ad2e85fd323db050798c +Z 4997b116ed1a6eabde161c270985eda0 diff --git a/manifest.uuid b/manifest.uuid index e0b134c72f..052f9cfc77 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -6676c7031d81202ad702142ecf9e64f14d94d968 \ No newline at end of file +373b56f0048fd6a1946a97acfcca40fd12f7d572 \ No newline at end of file diff --git a/src/os_unix.c b/src/os_unix.c index 1d74a884f6..26eb7039c8 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -1576,7 +1576,9 @@ int sqlite3UnixRandomSeed(char *zBuf){ int pid, fd; fd = open("/dev/urandom", O_RDONLY); if( fd<0 ){ - time((time_t*)zBuf); + time_t t; + time(&t); + memcpy(zBuf, &t, sizeof(t)); pid = getpid(); memcpy(&zBuf[sizeof(time_t)], &pid, sizeof(pid)); }else{