From: Ondřej Surý Date: Sat, 3 Apr 2021 14:12:43 +0000 (+0200) Subject: Allow printing credits buffer larger than 4k X-Git-Tag: archive/raspbian/8.2.23-1+rpi1^2~10 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3caefd0ab67b9ac5f64dab228b033fbcc2e8188e;p=php8.2.git Allow printing credits buffer larger than 4k Gbp-Pq: Name 0039-Allow-printing-credits-buffer-larger-than-4k.patch --- 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 "