1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-27 20:41:58 +03:00

Change the JSON extension so that it disallows control characters inside of

strings.  Fix for ticket [6c9b5514077fed34551f98e64c09a10dc2fc8e16].

FossilOrigin-Name: 475d8f82ec61a4ff3e6a7650731230ccecb6cc580d1397d189d0ba479d9bad4d
This commit is contained in:
drh
2017-04-10 12:25:05 +00:00
parent 7a6ea93fd8
commit e12e24ded8
4 changed files with 20 additions and 9 deletions

View File

@ -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'