aboutsummaryrefslogtreecommitdiff
path: root/ext/misc/json1.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/misc/json1.c')
-rw-r--r--ext/misc/json1.c5
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'