aboutsummaryrefslogtreecommitdiff
path: root/src/json.c
diff options
context:
space:
mode:
authordrh <>2024-09-04 16:01:44 +0000
committerdrh <>2024-09-04 16:01:44 +0000
commitbb4d2edf109be3f978807dd6f3a9d80624da1029 (patch)
tree1f2fb75c6a0f290facb00d27e20dce5782b6fe74 /src/json.c
parent109025c0a4a97d0fb48faf6e2d698955ab7f8e06 (diff)
downloadsqlite-bb4d2edf109be3f978807dd6f3a9d80624da1029.tar.gz
sqlite-bb4d2edf109be3f978807dd6f3a9d80624da1029.zip
Fix a bug in the parsing of some corner-case JSON PATH strings that contain
escaped double-quotes. FossilOrigin-Name: 60ac55c4b76355aaf7cbde38bf1f6082ff5612bf4ffc49ab69d00fd4e3d64e64
Diffstat (limited to 'src/json.c')
-rw-r--r--src/json.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/json.c b/src/json.c
index 7361c46d8..a0a075e66 100644
--- a/src/json.c
+++ b/src/json.c
@@ -2847,7 +2847,9 @@ static u32 jsonLookupStep(
zPath++;
if( zPath[0]=='"' ){
zKey = zPath + 1;
- for(i=1; zPath[i] && zPath[i]!='"'; i++){}
+ for(i=1; zPath[i] && zPath[i]!='"'; i++){
+ if( zPath[i]=='\\' && zPath[i+1]!=0 ) i++;
+ }
nKey = i-1;
if( zPath[i] ){
i++;