mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-09 14:21:03 +03:00
Fix a potential problem RCStr access on a JsonString object that is not
really and RCStr. Fuzzer/UBSAN find. FossilOrigin-Name: d2f2174ce2cc89606034e158149a2d05fc3627ec4d5cdb772add7a2250f29d78
This commit is contained in:
@@ -4115,7 +4115,7 @@ static void jsonArrayCompute(sqlite3_context *ctx, int isFinal){
|
||||
}else if( flags & JSON_BLOB ){
|
||||
jsonReturnStringAsBlob(pStr);
|
||||
if( isFinal ){
|
||||
sqlite3RCStrUnref(pStr->zBuf);
|
||||
if( !pStr->bStatic ) sqlite3RCStrUnref(pStr->zBuf);
|
||||
}else{
|
||||
pStr->nUsed--;
|
||||
}
|
||||
@@ -4235,7 +4235,7 @@ static void jsonObjectCompute(sqlite3_context *ctx, int isFinal){
|
||||
}else if( flags & JSON_BLOB ){
|
||||
jsonReturnStringAsBlob(pStr);
|
||||
if( isFinal ){
|
||||
sqlite3RCStrUnref(pStr->zBuf);
|
||||
if( !pStr->bStatic ) sqlite3RCStrUnref(pStr->zBuf);
|
||||
}else{
|
||||
pStr->nUsed--;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user