diff options
author | drh <> | 2023-12-12 17:13:10 +0000 |
---|---|---|
committer | drh <> | 2023-12-12 17:13:10 +0000 |
commit | 78e636bba65e57b364263418bdde2417752bd9fc (patch) | |
tree | 1c485686896a3918c5ae9aabf34994bac9ed54a7 /src | |
parent | 87399a56db384f4ebf188652132ef0f29cd57b75 (diff) | |
download | sqlite-78e636bba65e57b364263418bdde2417752bd9fc.tar.gz sqlite-78e636bba65e57b364263418bdde2417752bd9fc.zip |
Add NEVER to two unreachable branches in JSON.
FossilOrigin-Name: c96ebb086feb89341565cc52b970ae7799ce1327fe1ad4fc790f1b0dcaa6e229
Diffstat (limited to 'src')
-rw-r--r-- | src/json.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/json.c b/src/json.c index 5487f0402..e94cac6d5 100644 --- a/src/json.c +++ b/src/json.c @@ -1255,8 +1255,8 @@ static u32 jsonbValidityCheck( if( iDepth>JSON_MAX_DEPTH ) return i+1; sz = 0; n = jsonbPayloadSize(pParse, i, &sz); - if( n==0 ) return i+1; - if( i+n+sz!=iEnd ) return i+1; + if( NEVER(n==0) ) return i+1; /* Checked by caller */ + if( NEVER(i+n+sz!=iEnd) ) return i+1; /* Checked by caller */ z = pParse->aBlob; x = z[i] & 0x0f; switch( x ){ |