Fix applying offset to NULL in C
This fix should be safe since it (apparently) worked in practice before, which likely means that zEnd is not used in the case where zCsr is NULL. This means it likely doesn't matter what value we assign to zEnd when zCsr is NULL as long as it has defined behavior.
This commit is contained in:
parent
f20bfb87de
commit
9f3db80eca
|
@ -43143,7 +43143,7 @@ SQLITE_PRIVATE void sqlite3VdbeMakeReady(
|
|||
p->pFree = sqlite3DbMallocZero(db, nByte);
|
||||
}
|
||||
zCsr = p->pFree;
|
||||
zEnd = &zCsr[nByte];
|
||||
zEnd = zCsr ? &zCsr[nByte] : NULL;
|
||||
}while( nByte && !db->mallocFailed );
|
||||
|
||||
p->nCursor = (u16)nCursor;
|
||||
|
|
Loading…
Reference in New Issue