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

The return from sqlite3_value_blob() in jsonFuncArgMightBeBinary() might

be a NULL pointer.  Check for that case.

FossilOrigin-Name: 7b52b266b066f1385144c1103a3a411306db5f44568366ae1e93cd8cce799bbc
This commit is contained in:
drh
2023-10-07 19:46:22 +00:00
parent 3efb2c4791
commit de8ccf00fb
3 changed files with 8 additions and 8 deletions

View File

@@ -3451,7 +3451,7 @@ static int jsonFuncArgMightBeBinary(sqlite3_value *pJson){
nBlob = sqlite3_value_bytes(pJson);
if( nBlob<1 ) return 0;
aBlob = sqlite3_value_blob(pJson);
if( (aBlob[0] & 0x0f)>JSONB_OBJECT ) return 0;
if( aBlob==0 || (aBlob[0] & 0x0f)>JSONB_OBJECT ) return 0;
memset(&s, 0, sizeof(s));
s.aBlob = (u8*)aBlob;
s.nBlob = nBlob;