]> TLD Linux GIT Repositories - packages/php.git/blobdiff - php-fcgi-error_log-no-newlines.patch
- updated to 7.0.2, mostly PLD merge, but TLDized (as usual) and with some patches
[packages/php.git] / php-fcgi-error_log-no-newlines.patch
index 321452f97514890793464c640e7697a9b99d0646..83c45096ac141184734c26869bed7f939fbe5f9e 100644 (file)
@@ -1,14 +1,16 @@
---- php-5.6.6/sapi/cgi/cgi_main.c.orig 2015-02-24 12:35:21.097436930 +0100
-+++ php-5.6.6/sapi/cgi/cgi_main.c      2015-02-24 12:38:49.851431030 +0100
-@@ -739,10 +739,7 @@
-                       int ret, len = strlen(message);
-                       char *buf = malloc(len+2);
+--- php-7.0/sapi/cgi/cgi_main.c~       2015-05-21 23:12:23.000000000 +0300
++++ php-7.0/sapi/cgi/cgi_main.c        2015-05-21 23:13:24.947976867 +0300
+@@ -701,12 +701,8 @@
+               request = (fcgi_request*) SG(server_context);
+               if (request) {
+                       int ret, len = (int)strlen(message);
+-                      char *buf = malloc(len+2);
  
 -                      memcpy(buf, message, len);
 -                      memcpy(buf + len, "\n", sizeof("\n"));
--                      ret = fcgi_write(request, FCGI_STDERR, buf, len + 1);
+-                      ret = fcgi_write(request, FCGI_STDERR, buf, (int)(len + 1));
 -                      free(buf);
-+                      fcgi_write(request, FCGI_STDERR, message, len);
++                      ret = fcgi_write(request, FCGI_STDERR, message, len);
                        if (ret < 0) {
                                php_handle_aborted_connection();
                        }