# HG changeset patch # User Kim Alvefur # Date 1601839640 -7200 # Node ID 578ce0415398a9513ff7efb3887446a024065b79 # Parent 57215267dd4f3b883de5237d60e552777ee1bf5e util.dns: Fix returning read position after zero-length name Doesn't affect normal usage by Prosody since neither A nor AAAA records use this and SRV records has the host name last so the position is not needed. diff -r 57215267dd4f -r 578ce0415398 util/dns.lua --- a/util/dns.lua Wed Feb 02 17:31:39 2022 +0100 +++ b/util/dns.lua Sun Oct 04 21:27:20 2020 +0200 @@ -40,7 +40,7 @@ -- No support for pointers, but libunbound appears to take care of that. local function readDnsName(packet, pos) - if s_byte(packet, pos) == 0 then return "."; end + if s_byte(packet, pos) == 0 then return ".", pos+1; end local pack_len, r, len = #packet, {}; pos = pos or 1; repeat