From: Anatol Belski Date: Sat, 25 Oct 2014 00:13:44 +0000 (+0200) Subject: refix the broken place X-Git-Tag: POST_NATIVE_TLS_MERGE^2~47^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0a5b7d1316a778dc06a638869c8df8d4c989ddf0;p=php refix the broken place typecast from signed to unsigned of a bigger size --- diff --git a/ext/standard/string.c b/ext/standard/string.c index b60baa6b7b..152ae6d66f 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;