mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Do not allow the same JSON parse to be input to both arguments to the
json_patch() routine. FossilOrigin-Name: 8e781c6742792b3899ca60efc49c7eaee1df9f6b03d27c254b0e148b82946e19
This commit is contained in:
@@ -2672,10 +2672,11 @@ static void jsonPatchFunc(
|
||||
UNUSED_PARAMETER(argc);
|
||||
pX = jsonParseCached(ctx, argv[0], ctx, 1);
|
||||
if( pX==0 ) return;
|
||||
assert( pX->hasMod==0 );
|
||||
pX->hasMod = 1;
|
||||
pY = jsonParseCached(ctx, argv[1], ctx, 1);
|
||||
if( pY==0 ) return;
|
||||
pX->useMod = 1;
|
||||
pX->hasMod = 1;
|
||||
pY->useMod = 1;
|
||||
pResult = jsonMergePatch(pX, 0, pY->aNode);
|
||||
assert( pResult!=0 || pX->oom );
|
||||
|
||||
Reference in New Issue
Block a user