Avoid a NULL-pointer deref following OOM.

FossilOrigin-Name: 413015c029d850d4ce7e66be1f59b57f291254240a958856378a62f5ac4a5092
This commit is contained in:
drh 2018-04-18 19:08:44 +00:00
parent a90d84fe21
commit 5a2e65ed63
3 changed files with 8 additions and 8 deletions

View File

@ -1,5 +1,5 @@
C Add\sthe\s--sorterref\sN\soption\sto\sthe\sCLI.
D 2018-04-18T15:21:13.476
C Avoid\sa\sNULL-pointer\sderef\sfollowing\sOOM.
D 2018-04-18T19:08:44.210
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F Makefile.in 7016fc56c6b9bfe5daac4f34be8be38d8c0b5fab79ccbfb764d3b23bf1c6fff3
@ -491,7 +491,7 @@ F src/printf.c d3b7844ddeb11fbbdd38dd84d09c9c1ac171d21fb038473c3aa97981201cc660
F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
F src/resolve.c 66c73fcb7719b8ff0e841b58338f13604ff3e2b50a723f9b8f383595735262f6
F src/rowset.c 7b7e7e479212e65b723bf40128c7b36dc5afdfac
F src/select.c 6cf4c11b2f258940acc289ea57eaae1fba16689ae62e3a09ebbc6487d440bf09
F src/select.c 9257a7f26e6c9da27deae819098d1005f4e1c37e19b8f029292bd2b1aab35721
F src/shell.c.in 6c9e2c1136f3697eb75f5dce010e7af005f62b4e1fda6d1066c3a473eb922889
F src/sqlite.h.in aa9bd3ae4a077c7002059cb418271abe52214b0227b2a734bc44736b24cbcc40
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
@ -1718,7 +1718,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P f3596ab9eb1168dc75202e6f79e12c67d518b3a0659a0a629c707f43990fa7cf
R 0443c59f405eaa117ee330ad90988b78
P 902a40897f74ac8a3bc72ef84c2161ab308b5601381cc9eea18147bfefa978ce
R 4bf2a8a4f284f188f9cc406a1fead38f
U drh
Z 0415bd978b9c9d919a9a079609154b94
Z 857937520ddb8fedd9d522f195cdf4dc

View File

@ -1 +1 @@
902a40897f74ac8a3bc72ef84c2161ab308b5601381cc9eea18147bfefa978ce
413015c029d850d4ce7e66be1f59b57f291254240a958856378a62f5ac4a5092

View File

@ -884,7 +884,7 @@ static void selectInnerLoop(
}
#ifdef SQLITE_ENABLE_SORTER_REFERENCES
selectExprDefer(pParse, pSort, p->pEList, &pExtra);
if( pExtra ){
if( pExtra && pParse->db->mallocFailed==0 ){
/* If there are any extra PK columns to add to the sorter records,
** allocate extra memory cells and adjust the OpenEphemeral
** instruction to account for the larger records. This is only