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

Improved error detection for JSONB inputs.

FossilOrigin-Name: 6945e11aa441ace52b93cdbb81ac45b6f809987f3dbc522251e63f8cb948fddd
This commit is contained in:
drh
2023-10-06 22:16:09 +00:00
parent 7b4349735f
commit 6b8aa95c3c
3 changed files with 10 additions and 8 deletions

View File

@@ -3284,8 +3284,10 @@ static u32 jsonRenderBlob(
for(; k<sz; k++){
if( !sqlite3Isxdigit(zIn[k]) ){
pOut->eErr |= JSTRING_MALFORMED;
break;
}else{
u = u*16 + sqlite3HexToInt(zIn[k]);
}
u = u*16 + sqlite3HexToInt(zIn[k]);
}
jsonPrintf(100,pOut,"%llu",u);
break;