Avoid a crash that can occur after an obscure OOM in the built-in INSTR()
function. FossilOrigin-Name: b86b79c442a58d10aa005ba4f34095375a88d242
This commit is contained in:
@@ -208,6 +208,8 @@ static void instrFunc(
|
||||
zHaystack = sqlite3_value_text(argv[0]);
|
||||
zNeedle = sqlite3_value_text(argv[1]);
|
||||
isText = 1;
|
||||
if( zNeedle==0 ) return;
|
||||
assert( zHaystack );
|
||||
}
|
||||
while( nNeedle<=nHaystack && memcmp(zHaystack, zNeedle, nNeedle)!=0 ){
|
||||
N++;
|
||||
|
||||
Reference in New Issue
Block a user