mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-16 23:02:26 +03:00
Make sure the left-shift operator never overflows. (CVS 6605)
FossilOrigin-Name: 300da30178c46ab9f2ceb0c3e3ee3eac73d5d8e1
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
** so is applicable. Because this module is responsible for selecting
|
||||
** indices, you might also think of this module as the "query optimizer".
|
||||
**
|
||||
** $Id: where.c,v 1.392 2009/05/01 21:13:37 drh Exp $
|
||||
** $Id: where.c,v 1.393 2009/05/05 15:46:43 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@@ -384,6 +384,7 @@ static void whereSplit(WhereClause *pWC, Expr *pExpr, int op){
|
||||
*/
|
||||
static Bitmask getMask(WhereMaskSet *pMaskSet, int iCursor){
|
||||
int i;
|
||||
assert( pMaskSet->n<=sizeof(Bitmask)*8 );
|
||||
for(i=0; i<pMaskSet->n; i++){
|
||||
if( pMaskSet->ix[i]==iCursor ){
|
||||
return ((Bitmask)1)<<i;
|
||||
|
||||
Reference in New Issue
Block a user