diff options
author | Kim Alvefur <zash@zash.se> | 2020-10-04 21:27:20 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-10-04 21:27:20 +0200 |
commit | 29238183e9fd345cd0e60eeb59cfe179223cc3ea (patch) | |
tree | 8eab27416f5531b81ae7f14e078645166722bc99 /util/dns.lua | |
parent | c0be07a6b600329d3765c8baa14dc37eb8552620 (diff) | |
download | prosody-29238183e9fd345cd0e60eeb59cfe179223cc3ea.tar.gz prosody-29238183e9fd345cd0e60eeb59cfe179223cc3ea.zip |
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.
Diffstat (limited to 'util/dns.lua')
-rw-r--r-- | util/dns.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/dns.lua b/util/dns.lua index 146c6343..f086f2c1 100644 --- a/util/dns.lua +++ b/util/dns.lua @@ -40,7 +40,7 @@ local parsers = {}; -- 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 |