Commit 0370190a authored by Bob Halley's avatar Bob Halley
Browse files

REQUIRE that target is a valid name in dns_name_getlabelsequence()

parent 6a6a1f94
......@@ -494,7 +494,10 @@ void dns_name_getlabelsequence(dns_name_t *source,
* must not be changed while 'target' is still in use.
*
* Requires:
* 'source' and 'target' are valid names.
*
* first < dns_label_countlabels(name)
*
* first + n <= dns_label_countlabels(name)
*/
......
......@@ -748,6 +748,7 @@ dns_name_getlabelsequence(dns_name_t *source,
*/
REQUIRE(VALID_NAME(source));
REQUIRE(VALID_NAME(target));
REQUIRE(source->labels > 0);
REQUIRE(n > 0);
REQUIRE(first < source->labels);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment