fat Sat, 19 Jun 2010 16:31:19 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=300604
Log: - Fixed bug #52086 (No new line at the end of a included file crahes the PHP FPM daemon) Bug: http://bugs.php.net/52086 (Analyzed) No new line at the end of a included pool file crahes the PHP FPM daemon Changed paths: U php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_conf.c U php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c Modified: php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_conf.c =================================================================== --- php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_conf.c 2010-06-19 16:24:17 UTC (rev 300603) +++ php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_conf.c 2010-06-19 16:31:19 UTC (rev 300604) @@ -950,9 +950,7 @@ for (n=0; n<1024 && (nb_read = read(fd, &c, sizeof(char))) == sizeof(char) && c != '\n'; n++) { buf[n] = c; } - if (c == '\n') { - buf[n++] = c; - } + buf[n++] = '\n'; ini_lineno++; ini_filename = filename; tmp = zend_parse_ini_string(buf, 1, ZEND_INI_SCANNER_RAW, (zend_ini_parser_cb_t)fpm_conf_ini_parser, &error TSRMLS_CC); @@ -972,7 +970,7 @@ free(tmp); ini_recursion--; close(fd); - ret = -1; + return -1; } free(tmp); } Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c =================================================================== --- php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c 2010-06-19 16:24:17 UTC (rev 300603) +++ php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c 2010-06-19 16:31:19 UTC (rev 300604) @@ -950,9 +950,7 @@ for (n=0; n<1024 && (nb_read = read(fd, &c, sizeof(char))) == sizeof(char) && c != '\n'; n++) { buf[n] = c; } - if (c == '\n') { - buf[n++] = c; - } + buf[n++] = '\n'; ini_lineno++; ini_filename = filename; tmp = zend_parse_ini_string(buf, 1, ZEND_INI_SCANNER_RAW, (zend_ini_parser_cb_t)fpm_conf_ini_parser, &error TSRMLS_CC); @@ -972,7 +970,7 @@ free(tmp); ini_recursion--; close(fd); - ret = -1; + return -1; } free(tmp); }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php