Bug #78642 [NEW]: Wrong version displayed

From: Date: Mon, 07 Oct 2019 19:52:14 +0000
Subject: Bug #78642 [NEW]: Wrong version displayed
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-223124@lists.php.net to get a copy of this message
From: gedas at martynas dot it Operating system: CentOS 7 PHP version: 7.2.23 Package: ICONV related Bug Type: Bug Bug description:Wrong version displayed Description: ------------ After upgrading iconv 1.15 -> 1.16 phpinfo() shows iconv version being 1.0. /usr/local/include/iconv.h snippet: [...] 23:#define _LIBICONV_VERSION 0x0110 /* version number: (major<<8) + minor */ [...] And how php parses the version: 285:#if HAVE_LIBICONV 286: { 287: static char buf[16]; 288: snprintf(buf, sizeof(buf), "%d.%d", 289: ((_libiconv_version >> 8) & 0x0f), (_libiconv_version & 0x0f)); 290: version = buf; 291: } Till the 1.15 was all fine, as the version string was: 0x010F, after it went to 0x0110, the minor version became 0 due to the "_libiconv_version & 0x0f". Suggested change: #if HAVE_LIBICONV { static char buf[16]; snprintf(buf, sizeof(buf), "%d.%d", _libiconv_version >> 8, _libiconv_version & 0xff); version = buf; } Attaching suggested patch. Expected result: ---------------- Expected result iconv version 1.16 Actual result: -------------- Actual result iconv version 1.0 -- Edit bug report at https://bugs.php.net/bug.php?id=78642&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=78642&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=78642&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=78642&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=78642&r=needscript Try newer version: https://bugs.php.net/fix.php?id=78642&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=78642&r=support Expected behavior: https://bugs.php.net/fix.php?id=78642&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=78642&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=78642&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=78642&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=78642&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=78642&r=dst IIS Stability: https://bugs.php.net/fix.php?id=78642&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=78642&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=78642&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=78642&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=78642&r=mysqlcfg

« previous php.bugs (#223124) next »