Skip to content

Commit

Permalink
Bug 1369361 - Backport SQLite fix removing rand_s() in an attempt to …
Browse files Browse the repository at this point in the history
…avoid Lenovo DLL crashes. r=mak

SQLite check-in 3a2793aa:
https://www.sqlite.org/src/info/3a2793aa65727cbb

MozReview-Commit-ID: 1Q4tGhWLoRu
  • Loading branch information
cpeterso committed Sep 12, 2017
1 parent 60b4333 commit 0e302a2
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions db/sqlite3/src/sqlite3.c
Original file line number Diff line number Diff line change
Expand Up @@ -827,13 +827,6 @@ SQLITE_PRIVATE const char **sqlite3CompileOptions(int *pnOpt){
# define SQLITE_TCLAPI
#endif

/*
** Make sure that rand_s() is available on Windows systems with MSVC 2005
** or higher.
*/
#if defined(_MSC_VER) && _MSC_VER>=1400
# define _CRT_RAND_S
#endif

/*
** Include the header file used to customize the compiler options for MSVC.
Expand Down Expand Up @@ -43927,9 +43920,6 @@ static int winRandomness(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
EntropyGatherer e;
UNUSED_PARAMETER(pVfs);
memset(zBuf, 0, nBuf);
#if defined(_MSC_VER) && _MSC_VER>=1400 && !SQLITE_OS_WINCE
rand_s((unsigned int*)zBuf); /* rand_s() is not available with MinGW */
#endif /* defined(_MSC_VER) && _MSC_VER>=1400 */
e.a = (unsigned char*)zBuf;
e.na = nBuf;
e.nXor = 0;
Expand Down

0 comments on commit 0e302a2

Please sign in to comment.