Add an assert() to prevent the value of the SQLITE_VTABRISK macros from being

changed in a way that would break logic.

FossilOrigin-Name: 33babdb582ca712cc089165a953972096b57d1cb683954fa830df5e7befaadba
This commit is contained in:
drh 2021-06-08 12:22:24 +00:00
parent 822810b95a
commit 9025af1603
3 changed files with 9 additions and 8 deletions

View File

@ -1,5 +1,5 @@
C Avoid\sa\sbuffer\soverread\sin\sfts3\sthat\scould\soccur\swhen\shandling\scorrupt\sdata\sstructures.
D 2021-06-08T12:15:56.225
C Add\san\sassert()\sto\sprevent\sthe\svalue\sof\sthe\sSQLITE_VTABRISK\smacros\sfrom\sbeing\nchanged\sin\sa\sway\sthat\swould\sbreak\slogic.
D 2021-06-08T12:22:24.457
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -544,7 +544,7 @@ F src/printf.c 78fabb49b9ac9a12dd1c89d744abdc9b67fd3205e62967e158f78b965a29ec4b
F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
F src/resolve.c 35630effd4d16d2373caa41bae40a3d71f853f3ad0cb4f572f2ed4b8c350c1e9
F src/rowset.c ba9515a922af32abe1f7d39406b9d35730ed65efab9443dc5702693b60854c92
F src/select.c 2f4429e0b0ca031e360489c45dca5dfa06cd85480e12c0d1360b91e1c8e7f7a2
F src/select.c f0c7f050b85c902044e090d6bbe6425723d98f982c370ef573c0be40990bd9d4
F src/shell.c.in a4bc0e2ba9be798e293790f354dcc0099c6370127eec18cf49cb161b9dae2fbc
F src/sqlite.h.in f450394634eac00bc680c0e91582b818359c6ad61149f49f90fb6ecbd526b51f
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
@ -1918,7 +1918,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 078962a2164a784b135bacee51ef10973dc2e30de04353d48698d0e72edd63d8
R 5a17f4e5ebbfe022e0c97e67ae492f79
U dan
Z 7b7192d0a99b7f6acb9424a14999a3f8
P 45f459d2fa4be97d9bbb970efbc0b5d40efaf93f52ed111fd0fcdc572c24327b
R f24c3388372fbfff30e1a783fa15bb17
U drh
Z 0441089d1a94c0851a7c37efba5ddd60

View File

@ -1 +1 @@
45f459d2fa4be97d9bbb970efbc0b5d40efaf93f52ed111fd0fcdc572c24327b
33babdb582ca712cc089165a953972096b57d1cb683954fa830df5e7befaadba

View File

@ -5463,6 +5463,7 @@ static int selectExpander(Walker *pWalker, Select *p){
pTab->zName);
}
#ifndef SQLITE_OMIT_VIRTUALTABLE
assert( SQLITE_VTABRISK_Normal==1 && SQLITE_VTABRISK_High==2 );
if( IsVirtual(pTab)
&& pFrom->fg.fromDDL
&& ALWAYS(pTab->pVTable!=0)