mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Prevent a possible NULL pointer dereference in the OP_Found opcode that
can follow an OOM error. Problem found by OSS-Fuzz. FossilOrigin-Name: c2de178fe7e2e4e0d764e7e6ac637cfc8c053580c43f7246318dafad2974de3c
This commit is contained in:
@@ -4106,10 +4106,12 @@ case OP_Found: { /* jump, in3 */
|
||||
pIdxKey = &r;
|
||||
pFree = 0;
|
||||
}else{
|
||||
assert( pIn3->flags & MEM_Blob );
|
||||
rc = ExpandBlob(pIn3);
|
||||
assert( rc==SQLITE_OK || rc==SQLITE_NOMEM );
|
||||
if( rc ) goto no_mem;
|
||||
pFree = pIdxKey = sqlite3VdbeAllocUnpackedRecord(pC->pKeyInfo);
|
||||
if( pIdxKey==0 ) goto no_mem;
|
||||
assert( pIn3->flags & MEM_Blob );
|
||||
(void)ExpandBlob(pIn3);
|
||||
sqlite3VdbeRecordUnpack(pC->pKeyInfo, pIn3->n, pIn3->z, pIdxKey);
|
||||
}
|
||||
pIdxKey->default_rc = 0;
|
||||
|
Reference in New Issue
Block a user