Commit Graph

1 Commits

Author SHA1 Message Date
Richard Gibson c1bdeb82b2 Domain name limits (#478)
* limiting domain names to 255/63 octets/labels (#463)

(cherry picked from commit 0b729df06c)

* account for \ and \xxx in presentation format

(cherry picked from commit a094f774892fb4305051d185c2488cb43200c4d9)

* go fmt

* Add tests for UnpackDomainName

Domain names must not exceed 255 octets in wire format.

Ref gh-463
Ref gh-469

* Fix UnpackDomainName

* Introduce a long-domain sentinel error

A typed error would be better, but inconsistent with this library.
cf.  https://dave.cheney.net/2016/04/27/dont-just-check-errors-handle-them-gracefully
2017-03-29 20:43:02 +01:00