diff options
author | drh <> | 2023-12-03 19:59:45 +0000 |
---|---|---|
committer | drh <> | 2023-12-03 19:59:45 +0000 |
commit | 0a18a5807a43f44a43a84f446f82201d389886a2 (patch) | |
tree | 7d625001b5eee74912336e92f7375e2a8aee5e4c /src | |
parent | 78fa0186b822e137d6d6e157a28cbcad67275cdb (diff) | |
download | sqlite-0a18a5807a43f44a43a84f446f82201d389886a2.tar.gz sqlite-0a18a5807a43f44a43a84f446f82201d389886a2.zip |
Enable incorrect JSONB to be rendered into text without hitting an
assertion for a bad whitespace escape in a string.
FossilOrigin-Name: 4d6a9a217df6792b41766b774fb0c0553b45f9104c26a0955bf4a30862d7d7bf
Diffstat (limited to 'src')
-rw-r--r-- | src/json.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/json.c b/src/json.c index 0668ff6da..9d29685eb 100644 --- a/src/json.c +++ b/src/json.c @@ -2545,9 +2545,10 @@ static void jsonReturnFromBlob( }else if( c=='\r' && z[i+1]=='\n' ){ iIn++; continue; - }else if( 0xe2==(u8)c ){ - assert( 0x80==(u8)z[i+1] ); - assert( 0xa8==(u8)z[i+2] || 0xa9==(u8)z[i+2] ); + }else if( 0xe2==(u8)c + && 0x80==(u8)z[i+1] + && (0xa8==(u8)z[i+2] || 0xa9==(u8)z[i+2]) + ){ iIn += 2; continue; }else{ |