summaryrefslogtreecommitdiff
path: root/Zend/zend_exceptions.c
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2015-06-17 16:56:04 +0200
committerNikita Popov <nikic@php.net>2015-06-17 22:31:07 +0200
commit653c869348b7626d43a30f67be9362fbcce10d2b (patch)
treedaacc7f819ae0396942f41496d355ab250b19a0d /Zend/zend_exceptions.c
parent269acaa363cab7de8705b060ba9b1e32322fb0f4 (diff)
downloadphp-git-653c869348b7626d43a30f67be9362fbcce10d2b.tar.gz
Fix #61362: Exception::getTraceAsString and ::__toString scramble Unicode
The logic in smart_str_append_escaped() relies on unsigned values of c, so we have to declare it as such.
Diffstat (limited to 'Zend/zend_exceptions.c')
-rw-r--r--Zend/zend_exceptions.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c
index e731e21718..cf18084ff5 100644
--- a/Zend/zend_exceptions.c
+++ b/Zend/zend_exceptions.c
@@ -427,7 +427,7 @@ static void smart_str_append_escaped(smart_str *str, const char *s, size_t l) {
str->s->len += len;
for (i = 0; i < l; ++i) {
- char c = s[i];
+ unsigned char c = s[i];
if (c < 32 || c == '\\' || c > 126) {
*res++ = '\\';
switch (c) {