From: George Thessalonikefs Date: Tue, 10 Oct 2023 13:17:48 +0000 (+0200) Subject: - Fix infinite loop when reading multiple lines of input on a broken X-Git-Tag: release-1.19.0rc1~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=516f90abdb0f27d46c2bf7239c196ad08621df29;p=thirdparty%2Funbound.git - Fix infinite loop when reading multiple lines of input on a broken remote control socket. Addesses #947 and #948. --- diff --git a/daemon/remote.c b/daemon/remote.c index 4990fc8e9..0460d5308 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -590,7 +590,7 @@ ssl_read_line(RES* res, char* buf, size_t max) while(1) { ssize_t rr = recv(res->fd, buf+len, 1, 0); if(rr <= 0) { - if(rr == 0) { + if(rr == 0 && len != 0) { buf[len] = 0; return 1; } diff --git a/doc/Changelog b/doc/Changelog index 62b101dd2..a943cce57 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,7 @@ +10 October 2023: George + - Fix infinite loop when reading multiple lines of input on a broken + remote control socket. Addesses #947 and #948. + 9 October 2023: Wouter - Fix edns subnet so that queries with a source prefix of zero cause the recursor send no edns subnet option to the upstream.