From cbb5ac45a90e4109ff1f8536bf5d99aafd62ef0c Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Mon, 11 Jul 2022 10:21:48 +0200 Subject: [PATCH] Rec: Resize answer length to actual received length in udpQueryResponse Fixes #11771 --- pdns/pdns_recursor.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index ad3b263049..1f9d62aad8 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -215,6 +215,7 @@ static void handleGenUDPQueryResponse(int fd, FDMultiplexer::funcparam_t& var) t_fdm->removeReadFD(fd); if (ret >= 0) { + resp.resize(ret); MT->sendEvent(pident, &resp); } else { -- 2.47.2