Software /
code /
prosody
Changeset
12239:578ce0415398
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 04 Oct 2020 21:27:20 +0200 |
parents | 12238:57215267dd4f |
children | 12240:ffd66b461f6a |
files | util/dns.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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