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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user