diff options
author | drh <drh@noemail.net> | 2017-04-13 00:12:32 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2017-04-13 00:12:32 +0000 |
commit | 8671538cad6b007612648041e24ae06d1f86f79c (patch) | |
tree | 46e5088ea5b2512d17246e02033b57330b999299 /ext/misc/json1.c | |
parent | 03155f659fc32dd78bf433fca8b088811b2b956e (diff) | |
download | sqlite-8671538cad6b007612648041e24ae06d1f86f79c.tar.gz sqlite-8671538cad6b007612648041e24ae06d1f86f79c.zip |
Fix a regression caused by the fix for ticket [6c9b5514077fed34551f98e64c09a1] -
control characters allowed in JSON.
FossilOrigin-Name: 8e7b611863247a3bf46a96ec4b47d24c0ae0d60c9cee968a1cfd1da157e7c9bb
Diffstat (limited to 'ext/misc/json1.c')
-rw-r--r-- | ext/misc/json1.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/misc/json1.c b/ext/misc/json1.c index 486eaa428..60a34539a 100644 --- a/ext/misc/json1.c +++ b/ext/misc/json1.c @@ -801,7 +801,10 @@ static int jsonParseValue(JsonParse *pParse, u32 i){ j = i+1; for(;;){ c = z[j]; - if( c<=0x1f ) return -1; /* Control characters not allowed in strings */ + if( (c & ~0x1f)==0 ){ + /* Control characters are not allowed in strings */ + return -1; + } if( c=='\\' ){ c = z[++j]; if( c=='"' || c=='\\' || c=='/' || c=='b' || c=='f' |