Add NEVER to two unreachable branches in JSON.

FossilOrigin-Name: c96ebb086feb89341565cc52b970ae7799ce1327fe1ad4fc790f1b0dcaa6e229
This commit is contained in:
drh 2023-12-12 17:13:10 +00:00
parent 87399a56db
commit 78e636bba6
3 changed files with 9 additions and 9 deletions

View File

@ -1,5 +1,5 @@
C Improvements\sto\sJSONB\svalidation\s-\scatch\smore\scases\swhere\sthe\sinput\sdoes\nnot\sconform\sto\sspec.
D 2023-12-12T14:33:52.419
C Add\sNEVER\sto\stwo\sunreachable\sbranches\sin\sJSON.
D 2023-12-12T17:13:10.122
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -696,7 +696,7 @@ F src/hash.h 3340ab6e1d13e725571d7cee6d3e3135f0779a7d8e76a9ce0a85971fa3953c51
F src/hwtime.h f9c2dfb84dce7acf95ce6d289e46f5f9d3d1afd328e53da8f8e9008e3b3caae6
F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71
F src/insert.c 3f0a94082d978bbdd33c38fefea15346c6c6bffb70bc645a71dc0f1f87dd3276
F src/json.c 6fc223a6cf1f475dfe72376018615ed85a1415b57121571ad65747f8b845b57f
F src/json.c cd270629b4b99d065522b45c3d2b5185491b1ab3544843c6f780aa50755d54dc
F src/legacy.c d7874bc885906868cd51e6c2156698f2754f02d9eee1bae2d687323c3ca8e5aa
F src/loadext.c 7432c944ff197046d67a1207790a1b13eec4548c85a9457eb0896bb3641dfb36
F src/main.c ce714ee501122c76eb2e69b292bebe443aba611fc3b88e6786eb910285515fe4
@ -2153,8 +2153,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 fa5160687c2f970d407e8af73c246f7cd806bb4ce35f29a79ac534a8646a6c8e
R 06eab0897027e01e7643ca8237160284
P be1864eac4eb75cc30bf98f73092c8608467f4bd956240df6a0cbea9f1e09e85
R 6e221a94cd5525fe9f8a7e94ea467b60
U drh
Z fe2966c205a693292efc9fe6aaf9e427
Z 2ea9e875faf360824d045f495f8867aa
# Remove this line to create a well-formed Fossil manifest.

View File

@ -1 +1 @@
be1864eac4eb75cc30bf98f73092c8608467f4bd956240df6a0cbea9f1e09e85
c96ebb086feb89341565cc52b970ae7799ce1327fe1ad4fc790f1b0dcaa6e229

View File

@ -1255,8 +1255,8 @@ static u32 jsonbValidityCheck(
if( iDepth>JSON_MAX_DEPTH ) return i+1;
sz = 0;
n = jsonbPayloadSize(pParse, i, &sz);
if( n==0 ) return i+1;
if( i+n+sz!=iEnd ) return i+1;
if( NEVER(n==0) ) return i+1; /* Checked by caller */
if( NEVER(i+n+sz!=iEnd) ) return i+1; /* Checked by caller */
z = pParse->aBlob;
x = z[i] & 0x0f;
switch( x ){