From cee0fe7f0eca396c4e26309b3fa652bba63dd5cd Mon Sep 17 00:00:00 2001
From: Daniel Salzman <daniel.salzman@nic.cz>
Date: Wed, 20 Feb 2013 15:57:56 +0100
Subject: [PATCH] Fix strnlen problem in NetBSD

---
 src/knot/zone/zone-load.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/knot/zone/zone-load.c b/src/knot/zone/zone-load.c
index dd8f5d7f5..c155faecf 100644
--- a/src/knot/zone/zone-load.c
+++ b/src/knot/zone/zone-load.c
@@ -646,10 +646,8 @@ int knot_zload_open(zloader_t **dst, const char *source, const char *origin,
 	
 	/* Create context. */
 	parser_context_t *context = xmalloc(sizeof(parser_context_t));
-	context->origin_from_config = knot_dname_new_from_str(origin,
-	                                                       strnlen((char *)origin,
-	                                                               255),
-	                                                       NULL);
+	context->origin_from_config =
+		knot_dname_new_from_str(origin, strlen(origin), NULL);
 	assert(context->origin_from_config);
 	context->last_node = knot_node_new(context->origin_from_config,
 	                                    NULL, 0);
-- 
GitLab