From 442821039f32c850b9a64a142cf20ef629012685 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Sat, 3 Apr 2021 16:12:43 +0200 Subject: [PATCH] Allow printing credits buffer larger than 4k Gbp-Pq: Name 0039-Allow-printing-credits-buffer-larger-than-4k.patch --- ext/standard/credits.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/ext/standard/credits.c b/ext/standard/credits.c index 98dfe939..8ea0f5b9 100644 --- a/ext/standard/credits.c +++ b/ext/standard/credits.c @@ -233,7 +233,14 @@ PHPAPI void php_print_packaging_credits(int flag, int top) /* {{{ */ if (bytes > 0) { PUTS(" and is made available exclusively for "); - PUTS(buf); + do { + PUTS(buf); + + bytes = read(fd, buf, sizeof(buf) - 1); + if (bytes > 0) { + buf[bytes] = '\0'; + } + } while (bytes > 0); } else { PUTS(". This service is run together with Ondřej Surý, " "that's why a small subset of the PHP LTS packages " @@ -248,7 +255,14 @@ PHPAPI void php_print_packaging_credits(int flag, int top) /* {{{ */ ); if (bytes > 0) { PUTS(" and is made available exclusively for "); - PUTS(buf); + do { + PUTS(buf); + + bytes = read(fd, buf, sizeof(buf) - 1); + if (bytes > 0) { + buf[bytes] = '\0'; + } + } while (bytes > 0); } else { PUTS(". This service is run together with Ondřej Surý, " "that's why a small subset of the PHP LTS packages " -- 2.30.2