Update plen when getting retried query from stash.

They should be equal, but that depends on untrusted data.
This commit is contained in:
Simon Kelley
2025-02-10 12:26:15 +00:00
parent f9f8d19bf5
commit 717ff6adc3

View File

@@ -205,6 +205,7 @@ static void forward_query(int udpfd, union mysockaddr *udpaddr,
may fall through below and forward the query in the packet buffer again and we may fall through below and forward the query in the packet buffer again and we
want to use the same case scrambling as the first time. */ want to use the same case scrambling as the first time. */
blockdata_retrieve(forward->stash, forward->stash_len, (void *)header); blockdata_retrieve(forward->stash, forward->stash_len, (void *)header);
plen = forward->stash_len;
for (src = &forward->frec_src; src; src = src->next) for (src = &forward->frec_src; src; src = src->next)
if (src->orig_id == id && if (src->orig_id == id &&