]> granicus.if.org Git - php/commitdiff
Fix #78642: Wrong libiconv version displayed
authorChristoph M. Becker <cmbecker69@gmx.de>
Tue, 8 Oct 2019 10:09:11 +0000 (12:09 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Tue, 8 Oct 2019 10:09:11 +0000 (12:09 +0200)
The high byte of `_libiconv_version` specifies the major version; the
low byte the minor version.

NEWS
ext/iconv/iconv.c

diff --git a/NEWS b/NEWS
index 3b26acca5fe6304399edba0f45e20c7a948a6bc9..d2056ad45dce4b2819487698d2fe29332ab01a66 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,9 @@ PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 2019, PHP 7.2.25
 
+- Iconv:
+  . Fixed bug #78642 (Wrong libiconv version displayed). (gedas at martynas,
+    cmb).
 
 24 Oct 2019, PHP 7.2.24
 
index 781985ce3e41ba1d18b7610bb6d9ed131549bf74..12f8c90eaf42dc57a4ea8636667722fe14c7da2a 100644 (file)
@@ -286,7 +286,7 @@ PHP_MINIT_FUNCTION(miconv)
        {
                static char buf[16];
                snprintf(buf, sizeof(buf), "%d.%d",
-                   ((_libiconv_version >> 8) & 0x0f), (_libiconv_version & 0x0f));
+                       _libiconv_version >> 8, _libiconv_version & 0xff);
                version = buf;
        }
 #elif HAVE_GLIBC_ICONV