com php-src: refix the broken place: ext/standard/string.c

From: Date: Sat, 25 Oct 2014 00:13:44 +0000
Subject: com php-src: refix the broken place: ext/standard/string.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-82647@lists.php.net to get a copy of this message
Commit: 0a5b7d1316a778dc06a638869c8df8d4c989ddf0 Author: Anatol Belski <ab@php.net> Sat, 25 Oct 2014 02:13:44 +0200 Parents: 010f4b797922ab914c553d0d2db000058a7b303f Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0a5b7d1316a778dc06a638869c8df8d4c989ddf0 Log: refix the broken place typecast from signed to unsigned of a bigger size Changed paths: M ext/standard/string.c Diff: diff --git a/ext/standard/string.c b/ext/standard/string.c index b60baa6..152ae6d 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -2773,11 +2773,11 @@ PHPAPI char *php_strtr(char *str, size_t len, char *str_from, char *str_to, size do { xlat[j] = j; } while (++j != 0); for (i = 0; i < trlen; i++) { - xlat[(size_t) str_from[i]] = str_to[i]; + xlat[(size_t)(unsigned char) str_from[i]] = str_to[i]; } for (i = 0; i < len; i++) { - str[i] = xlat[(size_t) str[i]]; + str[i] = xlat[(size_t)(unsigned char) str[i]]; } return str;

« previous php.cvs (#82647) next »