aboutsummaryrefslogtreecommitdiff
path: root/ext/misc/json1.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2017-04-10 12:25:05 +0000
committerdrh <drh@noemail.net>2017-04-10 12:25:05 +0000
commite12e24ded81798d8580fbf527c6adcb3b7be3f7c (patch)
tree48d605afb6667ae6f4f8f6696ca2f12f585d8e49 /ext/misc/json1.c
parent7a6ea93fd88248a3b602df1418d409c7116fe981 (diff)
downloadsqlite-e12e24ded81798d8580fbf527c6adcb3b7be3f7c.tar.gz
sqlite-e12e24ded81798d8580fbf527c6adcb3b7be3f7c.zip
Change the JSON extension so that it disallows control characters inside of
strings. Fix for ticket [6c9b5514077fed34551f98e64c09a10dc2fc8e16]. FossilOrigin-Name: 475d8f82ec61a4ff3e6a7650731230ccecb6cc580d1397d189d0ba479d9bad4d
Diffstat (limited to 'ext/misc/json1.c')
-rw-r--r--ext/misc/json1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/misc/json1.c b/ext/misc/json1.c
index b12964ba4..0d1b9a464 100644
--- a/ext/misc/json1.c
+++ b/ext/misc/json1.c
@@ -785,7 +785,7 @@ static int jsonParseValue(JsonParse *pParse, u32 i){
j = i+1;
for(;;){
c = z[j];
- if( c==0 ) return -1;
+ if( c<=0x1f ) return -1; /* Control characters not allowed in strings */
if( c=='\\' ){
c = z[++j];
if( c=='"' || c=='\\' || c=='/' || c=='b' || c=='f'