diff options
author | drh <drh@noemail.net> | 2014-10-31 14:53:32 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2014-10-31 14:53:32 +0000 |
commit | ca3e10ea37c4808fa84063f06b02229801b28cc0 (patch) | |
tree | 25f7d9b2ab4ff71311882bcee951b6e9ab1cb62f /src/mutex_unix.c | |
parent | bc2866ca7abc2ad7cbb6878d65cd18e584cff8f5 (diff) | |
parent | 0fb5daed34ba6f16d761b8ad02b944ec59cf5c03 (diff) | |
download | sqlite-ca3e10ea37c4808fa84063f06b02229801b28cc0.tar.gz sqlite-ca3e10ea37c4808fa84063f06b02229801b28cc0.zip |
Merge recent trunk enhancements, and in particular the improvements to
the b-tree balancing logic, into the sessions branch.
FossilOrigin-Name: 28b044a51215a3f64dafb2cf3b6cb7d2029580ef
Diffstat (limited to 'src/mutex_unix.c')
-rw-r--r-- | src/mutex_unix.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mutex_unix.c b/src/mutex_unix.c index c8663144e..c936914d8 100644 --- a/src/mutex_unix.c +++ b/src/mutex_unix.c @@ -175,8 +175,12 @@ static sqlite3_mutex *pthreadMutexAlloc(int iType){ break; } default: { - assert( iType-2 >= 0 ); - assert( iType-2 < ArraySize(staticMutexes) ); +#ifdef SQLITE_ENABLE_API_ARMOR + if( iType-2<0 || iType-2>=ArraySize(staticMutexes) ){ + (void)SQLITE_MISUSE_BKPT; + return 0; + } +#endif p = &staticMutexes[iType-2]; #if SQLITE_MUTEX_NREF p->id = iType; |