In editPage(), if an attempt is made to edit an empty 64KB page, then take

the slow path through rebuildPage(), in order to maintain strict invariants
in the editPage() code.
[forum:/forumpost/0f37727c0d|Forum post 0f37727c0d].

FossilOrigin-Name: a865e574e510c1ca192d0bd5293fb583def90f7ed086af2c89ca856ce93d115b
This commit is contained in:
drh 2023-05-08 13:38:14 +00:00
parent c42bbfc550
commit addc7e0e5b
3 changed files with 8 additions and 8 deletions

View File

@ -1,5 +1,5 @@
C Ensure\sthat\sthe\slabel\sfor\sa\sJSON\sobject\sreally\sis\sa\sstring\sand\snot\san\sarray\nor\sobject\sthat\sjust\shappens\sto\send\swith\sa\sstring.\ndbsqfuzz\s32f62ed8676d0a153dbe756aeae3202d3670fe50.
D 2023-05-08T11:11:08.344
C In\seditPage(),\sif\san\sattempt\sis\smade\sto\sedit\san\sempty\s64KB\spage,\sthen\stake\nthe\sslow\spath\sthrough\srebuildPage(),\sin\sorder\sto\smaintain\sstrict\sinvariants\nin\sthe\seditPage()\scode.\n[forum:/forumpost/0f37727c0d|Forum\spost\s0f37727c0d].
D 2023-05-08T13:38:14.485
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -574,7 +574,7 @@ F src/auth.c f4fa91b6a90bbc8e0d0f738aa284551739c9543a367071f55574681e0f24f8cf
F src/backup.c 5c97e8023aab1ce14a42387eb3ae00ba5a0644569e3476f38661fa6f824c3523
F src/bitvec.c 7c849aac407230278445cb069bebc5f89bf2ddd87c5ed9459b070a9175707b3d
F src/btmutex.c 6ffb0a22c19e2f9110be0964d0731d2ef1c67b5f7fabfbaeb7b9dabc4b7740ca
F src/btree.c 1949007d2792cf761799348b3760c8489d1964c49efa9e52591aa1f2fcdbc96f
F src/btree.c ecaaf8d57cd8b5f4e3167bd59cf61cef031b4b2ee606e6afa11b96a60a14f9ef
F src/btree.h aa354b9bad4120af71e214666b35132712b8f2ec11869cb2315c52c81fad45cc
F src/btreeInt.h a9ae91868acc4b3146d47ae2a072aac2cf41ecb7386015752160c8e1a212d9f2
F src/build.c 7a7217f75f202eff03617ca447bb9c3bc07d5af49da1d3cff2b1a88e8e394686
@ -2068,8 +2068,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 832f6e9f797eecb9a3dae4e7e20c70eda1e91372e9d3ce4223d57f26582cdbd2
R ddf88db25bf9e90593a004ef5fa1384f
P c335737c2889722ea05b732a5efff8a2f31140c18ca038c41e05c2a26e0db5bd
R a4c80707056958d556ff67539a7c1798
U drh
Z af5b6de112b4788c002d9207b10d476b
Z b12cc07b0d2ae6aee47dbd1c24cec27b
# Remove this line to create a well-formed Fossil manifest.

View File

@ -1 +1 @@
c335737c2889722ea05b732a5efff8a2f31140c18ca038c41e05c2a26e0db5bd
a865e574e510c1ca192d0bd5293fb583def90f7ed086af2c89ca856ce93d115b

View File

@ -7696,7 +7696,7 @@ static int editPage(
nCell -= nTail;
}
pData = &aData[get2byteNotZero(&aData[hdr+5])];
pData = &aData[get2byte(&aData[hdr+5])];
if( pData<pBegin ) goto editpage_fail;
if( NEVER(pData>pPg->aDataEnd) ) goto editpage_fail;