1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Remove dead code. Improved reporting of errors in JSON inputs.

FossilOrigin-Name: 2eaa738e6b5c1b67b3e57c868d9c3a30eea38a0b3b8b02482f06d57a45b10921
This commit is contained in:
drh
2023-12-03 23:38:24 +00:00
parent 16e8a5b2f3
commit 9af45dc482
3 changed files with 8 additions and 10 deletions

View File

@@ -1729,6 +1729,7 @@ static int jsonConvertTextToBlob(
if( zJson[i] ){
i += json5Whitespace(&zJson[i]);
if( zJson[i] ){
if( pCtx ) sqlite3_result_error(pCtx, "malformed JSON", -1);
jsonParseReset(pParse);
return 1;
}
@@ -2801,9 +2802,6 @@ rebuild_from_cache:
p->hasNonstd = pFromCache->hasNonstd;
jsonParseFree(pFromCache);
return p;
}else{
jsonParseFree(pFromCache);
pFromCache = 0;
}
if( eType==SQLITE_BLOB ){
u32 n, sz = 0;