From 2c16b9cf62072afefb9a318f4a503bb9335f8537 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sat, 23 Jul 2016 16:48:07 +0200 Subject: [PATCH] Fix #66555: Always false condition in ext/gd/libgd/gdkanji.c This issue has already been fixed in libgd[1], so we fix PHP's bundled libgd accordingly. [1] --- NEWS | 3 ++- ext/gd/libgd/gdkanji.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index f264bedb182..b3000bd7458 100644 --- a/NEWS +++ b/NEWS @@ -32,6 +32,7 @@ PHP NEWS . Fixed bug #70315 (500 Server Error but page is fully rendered). (cmb) . Fixed bug #43828 (broken transparency of imagearc for truecolor in blendingmode). (cmb) + . Fixed bug #66555 (Always false condition in ext/gd/libgd/gdkanji.c). (cmb) - Intl: . Partially fixed #72506 (idn_to_ascii for UTS #46 incorrect for long domain @@ -73,7 +74,7 @@ PHP NEWS applications). (CVE-2016-5385) (Stas) - bz2: - . Fixed bug #72447 (Type Confusion in php_bz2_filter_create()). (gogil at + . Fixed bug #72447 (Type Confusion in php_bz2_filter_create()). (gogil at stealien dot com). . Fixed bug #72613 (Inadequate error handling in bzread()). (Stas) diff --git a/ext/gd/libgd/gdkanji.c b/ext/gd/libgd/gdkanji.c index 37f3bd10a07..be853c542d5 100644 --- a/ext/gd/libgd/gdkanji.c +++ b/ext/gd/libgd/gdkanji.c @@ -330,7 +330,7 @@ han2zen (int *p1, int *p2) { if ((*p2 >= 74 && *p2 <= 103) || (*p2 >= 110 && *p2 <= 122)) (*p2)++; - else if (*p2 == 131 && *p2 == 69) + else if (*p2 == 131 || *p2 == 69) *p2 = 148; } else if (handaku && *p2 >= 110 && *p2 <= 122)