From: Alan T. DeKok Date: Fri, 13 Feb 2026 19:25:43 +0000 (-0500) Subject: return correct error offset for question section X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9cdc1af0fdb4654fce97efb1c17bb3e58cfbf129;p=thirdparty%2Ffreeradius-server.git return correct error offset for question section --- diff --git a/src/protocols/dns/decode.c b/src/protocols/dns/decode.c index be0edec5fd8..54d72e7ce5b 100644 --- a/src/protocols/dns/decode.c +++ b/src/protocols/dns/decode.c @@ -265,7 +265,7 @@ ssize_t fr_dns_decode(TALLOC_CTX *ctx, fr_pair_list_t *out, uint8_t const *packe slen = decode_record(ctx, out, attr_dns_question, p, end, packet_ctx, packet + 4); if (slen < 0) { fr_strerror_printf("Failed decoding questions - %s", fr_strerror()); - return slen; + return slen - (p - packet); } p += slen; FR_PROTO_HEX_DUMP(p, end - p, "fr_dns_decode - after %zd bytes of questions", slen);