summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérôme Loyet <fat@php.net>2010-06-19 16:31:19 +0000
committerJérôme Loyet <fat@php.net>2010-06-19 16:31:19 +0000
commitffdd175918818f07647ee5b2a36d19bd20077a27 (patch)
tree275a25853c4c9bd725530e4f6b4241acc74eb51c
parent5a4a66cdd5280cf7d83cec5a4aee8baf0f6d757d (diff)
downloadphp-git-ffdd175918818f07647ee5b2a36d19bd20077a27.tar.gz
- Fixed bug #52086 (No new line at the end of a included file crahes the PHP FPM daemon)
-rw-r--r--sapi/fpm/fpm/fpm_conf.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sapi/fpm/fpm/fpm_conf.c b/sapi/fpm/fpm/fpm_conf.c
index e2c0e30a13..711624f600 100644
--- a/sapi/fpm/fpm/fpm_conf.c
+++ b/sapi/fpm/fpm/fpm_conf.c
@@ -950,9 +950,7 @@ int fpm_conf_load_ini_file(char *filename TSRMLS_DC) /* {{{ */
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 @@ int fpm_conf_load_ini_file(char *filename TSRMLS_DC) /* {{{ */
free(tmp);
ini_recursion--;
close(fd);
- ret = -1;
+ return -1;
}
free(tmp);
}