com php-src: ignore invalid UTF8 symbols: ext/json/json.c

From: Date: Thu, 12 Dec 2013 08:47:42 +0000
Subject: com php-src: ignore invalid UTF8 symbols: ext/json/json.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-76639@lists.php.net to get a copy of this message
Commit: e01efb40e14c2a5e495582764b0c9d9bee98888e Author: Antony Dovgal <tony2001@php.net> Fri, 18 Jan 2013 11:20:41 +0400 Parents: 7949d5be476ce056b22539ed6fd742f1f8af2b33 Branches: badoo-5.5_mysqlnd Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e01efb40e14c2a5e495582764b0c9d9bee98888e Log: ignore invalid UTF8 symbols Changed paths: M ext/json/json.c Diff: diff --git a/ext/json/json.c b/ext/json/json.c index 9bc8d5e..875a79f 100644 --- a/ext/json/json.c +++ b/ext/json/json.c @@ -369,7 +369,8 @@ static int json_utf8_to_utf16(unsigned short *utf16, char utf8[], int len) /* {{ for (j=0 ; pos < len ; j++) { us = php_next_utf8_char((const unsigned char *)utf8, len, &pos, &status); if (status != SUCCESS) { - return -1; + /* return -1; */ + continue; } /* From http://en.wikipedia.org/wiki/UTF16 */ if (us >= 0x10000) { @@ -385,7 +386,8 @@ static int json_utf8_to_utf16(unsigned short *utf16, char utf8[], int len) /* {{ for (j=0 ; pos < len ; j++) { us = php_next_utf8_char((const unsigned char *)utf8, len, &pos, &status); if (status != SUCCESS) { - return -1; + /* return -1; */ + continue; } if (us >= 0x10000) { j++;

« previous php.cvs (#76639) next »