]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
make the define
authorMiek Gieben <miekg@NLnetLabs.nl>
Thu, 10 Mar 2005 13:41:29 +0000 (13:41 +0000)
committerMiek Gieben <miekg@NLnetLabs.nl>
Thu, 10 Mar 2005 13:41:29 +0000 (13:41 +0000)
ldns/rr.h
rr.c

index fdc86f5b6d329104eaffc62f95acfba63e6b32ce..6d4de124e6dc518e65615dfa279a3b8ae146130b 100644 (file)
--- a/ldns/rr.h
+++ b/ldns/rr.h
@@ -24,6 +24,8 @@
 #define MAX_DOMAINLEN    255
 /** Maximum number of pointers in 1 dname */
 #define MAX_POINTERS   65535
+/** Maximum number of rr's in a rr_list */
+#define MAX_RR         65535
 /** The bytes TTL, CLASS and length use up in an rr */
 #define RR_OVERHEAD    10
 
diff --git a/rr.c b/rr.c
index 9b4fc3e12ba642a71ae329c198a120117823c7a1..d0ebe81523aa285aa3b27b677b7deb30bf37546b 100644 (file)
--- a/rr.c
+++ b/rr.c
@@ -443,9 +443,8 @@ ldns_rr_list_cat(ldns_rr_list *left, ldns_rr_list *right)
        if (right) {
                r_rr_count = ldns_rr_list_rr_count(right);
        }
-
-       /* constant DEFINE? */
-       if (l_rr_count + r_rr_count > 65535 ) {
+       
+       if (l_rr_count + r_rr_count > MAX_RR ) {
                /* overflow error */
                return NULL;
        }