[erlang-patches] [erlang-bugs] TXT record decoding bug in inet_dns

Geoff Cant geoff.cant@REDACTED
Tue Oct 7 14:28:06 CEST 2008


"Matthew Dempsky" <matthew.dempsky@REDACTED> writes:

> 2008/10/6 Geoff Cant <nem@REDACTED>:
>> inet_dns incorrectly decodes the RData for TXT records as RData instead
>> of [Length | Text] = RData, Text. (The RData for TXT records is encoded
>> as <<Len:8, Text:Len/binary>>).
>
> RDATA for TXT records allows more than one character string.

Good point - in which case txt records should decode to a list of
strings. Updated patch attached (encoding and decoding) against R12B-4
(supercedes previous patches).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dns_txt_record_fix3.diff
Type: text/x-patch
Size: 1445 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20081007/ef710f07/attachment.bin>
-------------- next part --------------

Cheers,
-- 
Geoff Cant


More information about the erlang-patches mailing list