]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Improve the robustness of the updateAccumulator() routine against OOM.
authordrh <>
Fri, 25 Nov 2022 13:15:48 +0000 (13:15 +0000)
committerdrh <>
Fri, 25 Nov 2022 13:15:48 +0000 (13:15 +0000)
FossilOrigin-Name: d2844f577b69fdc16a0a2568c0958fc3d8aff33e9a0ef80e0f58e92f01097432

manifest
manifest.uuid
src/select.c

index 77a2dfc4d6dafabad9ab9b8c0320ffaa163c7e04..d326feb02b857a9603c473542068151a3e0da8f0 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Improved\scomments.\s\sAdd\sassert()s\sto\sverify\sthat\sthe\sAggInfo\sstructure\nis\sunchanged\safter\sregisters\shave\sbeen\sassigned.
-D 2022-11-25T13:08:20.992
+C Improve\sthe\srobustness\sof\sthe\supdateAccumulator()\sroutine\sagainst\sOOM.
+D 2022-11-25T13:15:48.547
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -641,7 +641,7 @@ F src/printf.c e99ee9741e79ae3873458146f59644276657340385ade4e76a5f5d1c25793764
 F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c
 F src/resolve.c efea4e5fbecfd6d0a9071b0be0d952620991673391b6ffaaf4c277b0bb674633
 F src/rowset.c ba9515a922af32abe1f7d39406b9d35730ed65efab9443dc5702693b60854c92
-F src/select.c 6168029423615a01de361024c56261f2f39d85adcd6da06137010f7ceea759b4
+F src/select.c 40a7d7b49b087789cdbf000e7b9328d3bbd29ee4ea585fad75e8b29fa567497c
 F src/shell.c.in 09cb15d7421c475f2d308f6a4312d8d690916ea5cb62ea1618f2f4ce5703af35
 F src/sqlite.h.in 100fc660c2f19961b8ed8437b9d53d687de2f8eb2b96437ec6da216adcb643ca
 F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
@@ -2060,8 +2060,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 939cb47025354e2df047de7654c0b06f791957cfe4e904abe8892207cea90215
-R 85b4d1494a033b09f8257ada7ad96c3c
+P 5200b84195ee1ccaa387f7032eae3d463724c48cb53ba0251bbc79e927dd9752
+R d91874ddf96958a005f34b5d280b17b3
 U drh
-Z f7018e8b2be8d601c79b6c13f2f54a26
+Z b1915dcd60d8f6304cf98a15b81e844e
 # Remove this line to create a well-formed Fossil manifest.
index 07bc523f18a01f7e7234d83428d7d6de86e1c26c..7938fd8387f4ee96e3a6a6a269724cf9266d9333 100644 (file)
@@ -1 +1 @@
-5200b84195ee1ccaa387f7032eae3d463724c48cb53ba0251bbc79e927dd9752
\ No newline at end of file
+d2844f577b69fdc16a0a2568c0958fc3d8aff33e9a0ef80e0f58e92f01097432
\ No newline at end of file
index e76198772d79f2a1c881b053fe947085782298d6..215acd6a01efda4621635906601e8f1ad4d58949 100644 (file)
@@ -6430,8 +6430,8 @@ static void finalizeAggFunctions(Parse *pParse, AggInfo *pAggInfo){
 
 
 /*
-** Update the accumulator memory cells for an aggregate based on
-** the current cursor position.
+** Generate code that will update the accumulator memory cells for an
+** aggregate based on the current cursor position.
 **
 ** If regAcc is non-zero and there are no min() or max() aggregates
 ** in pAggInfo, then only populate the pAggInfo->nAccumulator accumulator
@@ -6452,6 +6452,7 @@ static void updateAccumulator(
   struct AggInfo_col *pC;
 
   assert( pAggInfo->iFirstReg>0 );
+  if( pParse->nErr ) return;
   pAggInfo->directMode = 1;
   for(i=0, pF=pAggInfo->aFunc; i<pAggInfo->nFunc; i++, pF++){
     int nArg;