1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-09 14:21:03 +03:00

Fix the parsing of non-standard "Infinity" and "NaN" values from text into

JSONB.

FossilOrigin-Name: df1fbbeb83a2b4a496c9de0d86c7c8c677f8fe3bc770da163dcc1d338a17b58b
This commit is contained in:
drh
2023-10-05 18:33:19 +00:00
parent 5b6cfb7906
commit 51d507d432
3 changed files with 8 additions and 9 deletions

View File

@@ -3097,8 +3097,7 @@ json_parse_restart:
}
if( sqlite3Isalnum(z[i+nn]) ) continue;
if( aNanInfName[k].eType==JSON_REAL ){
jsonBlobAppendOneByte(pParse, JSONB_FLOAT);
jsonBlobAppendOneByte(pParse, 5);
jsonBlobAppendOneByte(pParse, JSONB_FLOAT | 0x50);
jsonBlobAppendNBytes(pParse, (const u8*)"9e999", 5);
}else{
jsonBlobAppendOneByte(pParse, JSONB_NULL);