Fix OOM error reporting in the json1_group_object() SQL function. Remove
an unreachable branch from the JSON1 logic. FossilOrigin-Name: b54098491531cd26ed461275ef4aae3d3ec9065e
This commit is contained in:
+3
-3
@@ -1662,7 +1662,7 @@ static void jsonObjectFinal(sqlite3_context *ctx){
|
||||
if( pStr ){
|
||||
jsonAppendChar(pStr, '}');
|
||||
if( pStr->bErr ){
|
||||
if( pStr->bErr==0 ) sqlite3_result_error_nomem(ctx);
|
||||
if( pStr->bErr==1 ) sqlite3_result_error_nomem(ctx);
|
||||
assert( pStr->bStatic );
|
||||
}else{
|
||||
sqlite3_result_text(ctx, pStr->zBuf, pStr->nUsed,
|
||||
@@ -1940,9 +1940,9 @@ static int jsonEachColumn(
|
||||
/* For json_each() path and root are the same so fall through
|
||||
** into the root case */
|
||||
}
|
||||
case JEACH_ROOT: {
|
||||
default: {
|
||||
const char *zRoot = p->zRoot;
|
||||
if( zRoot==0 ) zRoot = "$";
|
||||
if( zRoot==0 ) zRoot = "$";
|
||||
sqlite3_result_text(ctx, zRoot, -1, SQLITE_STATIC);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user