]> git.ipfire.org Git - thirdparty/ldns.git/commit
Do not allow empty names in `ldns_dname_new()` 1/head
authorFrank Denis <github@pureftpd.org>
Sun, 20 Nov 2016 16:55:09 +0000 (17:55 +0100)
committerFrank Denis <github@pureftpd.org>
Sun, 20 Nov 2016 16:55:09 +0000 (17:55 +0100)
commit97b222de0730dada823999e4ac00dabab9478035
tree3c87152fd94ae6968ab84c1e337e50a19ebb77b9
parent481c17a67b7d1a3b3cdf573a966b53c3ae9ed564
Do not allow empty names in `ldns_dname_new()`

A name has to be at least 1 byte, so return `NULL` if this is not the case.

Before that change, we had a paradoxical situation where
`ldns_dname_new(0, NULL)` returned a valid RDF pointer, but trying to use
that pointer with functions such as `ldns_rdf_print()` had an undefined
behavior.
dname.c