2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 22:45:39 +00:00

Fix the invalid condition variable

Although harmless, the memmove() in tlsdns and tcpdns was guarded by a
current message length variable that was always bigger than 0 instead of
correct current buffer length remainder variable.
This commit is contained in:
Ondřej Surý
2021-02-09 13:25:52 +01:00
parent 4775e9f256
commit f225462055
2 changed files with 2 additions and 2 deletions

View File

@@ -999,7 +999,7 @@ processbuffer(isc_nmsocket_t *sock) {
len += 2;
sock->buf_len -= len;
if (len > 0) {
if (sock->buf_len > 0) {
memmove(sock->buf, sock->buf + len, sock->buf_len);
}