diff options
author | drh <drh@noemail.net> | 2015-09-23 01:10:29 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2015-09-23 01:10:29 +0000 |
commit | f27cd1f3aa7852d29a27eac7228769ce93b80635 (patch) | |
tree | e947e849605d192213ca445a9987ee0c0001ac60 /ext/misc/json1.c | |
parent | 40e0e0dbe7f7a70b437325aae41c865bcb87ab24 (diff) | |
download | sqlite-f27cd1f3aa7852d29a27eac7228769ce93b80635.tar.gz sqlite-f27cd1f3aa7852d29a27eac7228769ce93b80635.zip |
Do not allow a comma at the end of a JSON array or object.
FossilOrigin-Name: 7c7a3f3e9bc2f7a7334d8d6eae183d83f22097be
Diffstat (limited to 'ext/misc/json1.c')
-rw-r--r-- | ext/misc/json1.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/misc/json1.c b/ext/misc/json1.c index db8d09b9b..3dd831f9c 100644 --- a/ext/misc/json1.c +++ b/ext/misc/json1.c @@ -606,7 +606,7 @@ static int jsonParseValue(JsonParse *pParse, u32 i){ while( safe_isspace(pParse->zJson[j]) ){ j++; } x = jsonParseValue(pParse, j); if( x<0 ){ - if( x==(-2) ) return j+1; + if( x==(-2) && pParse->nNode==(u32)iThis+1 ) return j+1; return -1; } if( pParse->oom ) return -1; @@ -636,7 +636,7 @@ static int jsonParseValue(JsonParse *pParse, u32 i){ while( safe_isspace(pParse->zJson[j]) ){ j++; } x = jsonParseValue(pParse, j); if( x<0 ){ - if( x==(-3) ) return j+1; + if( x==(-3) && pParse->nNode==(u32)iThis+1 ) return j+1; return -1; } j = x; |