mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-09 14:21:03 +03:00
Slightly stricter testing for when a BLOB is valid JSONB: If the element
is a null, true, or false, its payload size must be zero. FossilOrigin-Name: 487781be8a93d9b8d870efb9f25822bb4bbcf9d39d571d1017e9c29043ea515d
This commit is contained in:
@@ -3415,6 +3415,8 @@ static int jsonFuncArgMightBeBinary(sqlite3_value *pJson){
|
||||
s.nBlob = nBlob;
|
||||
n = jsonbPayloadSize(&s, 0, &sz);
|
||||
if( n==0 ) return 0;
|
||||
if( sz+n!=(u32)nBlob ) return 0;
|
||||
if( (aBlob[0] & 0x0f)<=JSONB_FALSE && sz>0 ) return 0;
|
||||
return sz+n==(u32)nBlob;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user