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:
Andrew Noyes 2021-06-04 09:35:03 -07:00
parent f20bfb87de
commit 9f3db80eca
1 changed files with 1 additions and 1 deletions

View File

@ -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;