From: W.C.A. Wijngaards Date: Tue, 3 Aug 2021 12:08:30 +0000 (+0200) Subject: - Annotate assertion into error printout; we think it may be an X-Git-Tag: release-1.13.2rc1~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2a0df9e72e523ad4e2d9274e06ae0de6cc38cc80;p=thirdparty%2Funbound.git - Annotate assertion into error printout; we think it may be an error, but the situation looks harmless. --- diff --git a/doc/Changelog b/doc/Changelog index 8c3c8abc3..c8c9b7041 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -5,6 +5,8 @@ 3 August 2021: Wouter - Merge PR #517 from dyunwei: #420 breaks the mesh reply list function that need to reuse the dns answer. + - Annotate assertion into error printout; we think it may be an + error, but the situation looks harmless. 2 August 2021: Wouter - Prepare for OpenSSL 3.0.0 provider API usage, move the sldns diff --git a/util/netevent.c b/util/netevent.c index d2d1481f7..11c642a2b 100644 --- a/util/netevent.c +++ b/util/netevent.c @@ -1727,7 +1727,8 @@ comm_point_tcp_handle_read(int fd, struct comm_point* c, int short_ok) (int)sldns_buffer_limit(c->buffer)); } - log_assert(sldns_buffer_remaining(c->buffer) > 0); + if(sldns_buffer_remaining(c->buffer) == 0) + log_err("in comm_point_tcp_handle_read buffer_remaining is not > 0 as expected, continuing with (harmless) 0 length recv"); r = recv(fd, (void*)sldns_buffer_current(c->buffer), sldns_buffer_remaining(c->buffer), 0); if(r == 0) {