mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-09 14:21:03 +03:00
Fix minor parse-to-BLOB bugs.
FossilOrigin-Name: 8b53b2e6600c324ff7864840d98a3f03896b9792fcb60b70cc1f6227b3bd4ca1
This commit is contained in:
12
manifest
12
manifest
@@ -1,5 +1,5 @@
|
||||
C Add\sthe\sability\sto\srender\sa\sbinary\sBLOB\sback\sinto\svalid\scanonical\sJSON.
|
||||
D 2023-09-22T14:33:39.536
|
||||
C Fix\sminor\sparse-to-BLOB\sbugs.
|
||||
D 2023-09-22T16:20:48.168
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
@@ -670,7 +670,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 574ed4c90fc5a18d40665557c56987d6ad1cd78644fdd698b755002538252de0
|
||||
F src/json.c 522ebfebd77224594e2fcd9ea18e201ac8b997d5f1cf2c71d8eba00e874b54b2
|
||||
F src/legacy.c d7874bc885906868cd51e6c2156698f2754f02d9eee1bae2d687323c3ca8e5aa
|
||||
F src/loadext.c 98cfba10989b3da6f1807ad42444017742db7f100a54f1032af7a8b1295912c0
|
||||
F src/main.c 618aeb399e993cf561864f4b0cf6a331ee4f355cf663635f8d9da3193a46aa40
|
||||
@@ -2121,8 +2121,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 b817dd865ed60fc4da0b662a9edec0fceb8921b02ce98133bdd565988939fd0f
|
||||
R f9832ae6b1e64d76b924944a3c617b61
|
||||
P 0b70cb77a4c8e3f17932f1ecca3942e0b0b03de637fb9656a130fe045f7ef826
|
||||
R e81e3fd90e402a6e846b93a0d3beab83
|
||||
U drh
|
||||
Z 86dcd161b824c66e770c11b16ee3a065
|
||||
Z 285487434c996c07680e15a392e180f6
|
||||
# Remove this line to create a well-formed Fossil manifest.
|
||||
|
||||
@@ -1 +1 @@
|
||||
0b70cb77a4c8e3f17932f1ecca3942e0b0b03de637fb9656a130fe045f7ef826
|
||||
8b53b2e6600c324ff7864840d98a3f03896b9792fcb60b70cc1f6227b3bd4ca1
|
||||
16
src/json.c
16
src/json.c
@@ -2480,7 +2480,7 @@ json_parse_restart:
|
||||
if( x<=0 ){
|
||||
if( x==(-2) ){
|
||||
j = pParse->iErr;
|
||||
if( pParse->nBlob!=(u32)iThis+1 ) pParse->hasNonstd = 1;
|
||||
if( pParse->nBlob!=(u32)iStart ) pParse->hasNonstd = 1;
|
||||
break;
|
||||
}
|
||||
j += json5Whitespace(&z[j]);
|
||||
@@ -2560,7 +2560,7 @@ json_parse_restart:
|
||||
pParse->iErr = j;
|
||||
return -1;
|
||||
}
|
||||
if( pParse->nErr==0 ){
|
||||
if( pParse->oom==0 ){
|
||||
jsonBlobChangePayloadSize(pParse, iThis, pParse->nBlob - iStart);
|
||||
}
|
||||
pParse->iDepth--;
|
||||
@@ -2581,7 +2581,7 @@ json_parse_restart:
|
||||
if( x<=0 ){
|
||||
if( x==(-3) ){
|
||||
j = pParse->iErr;
|
||||
if( pParse->nBlob!=iThis+4 ) pParse->hasNonstd = 1;
|
||||
if( pParse->nBlob!=iStart ) pParse->hasNonstd = 1;
|
||||
break;
|
||||
}
|
||||
if( x!=(-1) ) pParse->iErr = j;
|
||||
@@ -2614,7 +2614,7 @@ json_parse_restart:
|
||||
pParse->iErr = j;
|
||||
return -1;
|
||||
}
|
||||
if( pParse->iErr==0 ){
|
||||
if( pParse->oom==0 ){
|
||||
jsonBlobChangePayloadSize(pParse, iThis, pParse->nBlob - iStart);
|
||||
}
|
||||
pParse->iDepth--;
|
||||
@@ -3148,11 +3148,11 @@ static u32 jsonRenderBlob(
|
||||
n = jsonbPayloadSize(pParse, i, &sz);
|
||||
j = i+n;
|
||||
iEnd = j+sz;
|
||||
while( 1 /* exit by break */ ){
|
||||
while( j<iEnd ){
|
||||
j = jsonRenderBlob(pParse, j, pOut);
|
||||
if( j>=iEnd ) break;
|
||||
jsonAppendChar(pOut, ',');
|
||||
}
|
||||
if( sz>0 ) pOut->nUsed--;
|
||||
jsonAppendChar(pOut, ']');
|
||||
break;
|
||||
}
|
||||
@@ -3162,11 +3162,11 @@ static u32 jsonRenderBlob(
|
||||
n = jsonbPayloadSize(pParse, i, &sz);
|
||||
j = i+n;
|
||||
iEnd = j+sz;
|
||||
while( 1 /* edit by break */ ){
|
||||
while( j<iEnd ){
|
||||
j = jsonRenderBlob(pParse, j, pOut);
|
||||
if( j>=iEnd ) break;
|
||||
jsonAppendChar(pOut, (x++ & 1) ? ',' : ':');
|
||||
}
|
||||
if( sz>0 ) pOut->nUsed--;
|
||||
jsonAppendChar(pOut, '}');
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user