stas Sun Oct 19 09:47:36 2003 EDT
Modified files:
/php-src/win32 registry.c
Log:
fix wrong string length for registry values
Index: php-src/win32/registry.c
diff -u php-src/win32/registry.c:1.14 php-src/win32/registry.c:1.15
--- php-src/win32/registry.c:1.14 Sun Oct 19 06:36:36 2003
+++ php-src/win32/registry.c Sun Oct 19 09:47:35 2003
@@ -72,7 +72,8 @@
RegEnumValue(hKey, i, namebuf, &namebuf_len, NULL,
&lType, valuebuf, &valuebuf_len);
if ((lType == REG_SZ) || (lType == REG_EXPAND_SZ)) {
- zend_alter_ini_entry(namebuf, namebuf_len + 1,
valuebuf, valuebuf_len, PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE);
+ /* valuebuf_len includes trailing 0 */
+ zend_alter_ini_entry(namebuf, namebuf_len + 1,
valuebuf, valuebuf_len?valuebuf_len-1:0, PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE);
}
i++;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php