mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-22 20:22:44 +03:00
Fix a segfault that can occur when the LHS of a LIKE operator has an
undefined collating sequence. Ticket [1258875e07553]. FossilOrigin-Name: a82e6b4585b9ddba581204976cd5ea8704339185
This commit is contained in:
@@ -653,7 +653,7 @@ static int isLikeOrGlob(
|
||||
}
|
||||
assert( pLeft->iColumn!=(-1) ); /* Because IPK never has AFF_TEXT */
|
||||
pColl = sqlite3ExprCollSeq(pParse, pLeft);
|
||||
assert( pColl!=0 ); /* Every non-IPK column has a collating sequence */
|
||||
if( pColl==0 ) return 0; /* Happens when LHS has an undefined collation */
|
||||
if( (pColl->type!=SQLITE_COLL_BINARY || *pnoCase) &&
|
||||
(pColl->type!=SQLITE_COLL_NOCASE || !*pnoCase) ){
|
||||
/* IMP: R-09003-32046 For the GLOB operator, the column must use the
|
||||
|
||||
Reference in New Issue
Block a user