]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix Hardcoded Constant, reported by X41 D-Sec.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 3 Dec 2019 16:23:38 +0000 (17:23 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 3 Dec 2019 16:23:38 +0000 (17:23 +0100)
doc/Changelog
sldns/wire2str.c

index 08a225157d20a786c8351de09aaed5c5ec280414..05af5220dd133cc87f6e40e3387002cc0254d9c8 100644 (file)
@@ -31,6 +31,7 @@
        - Fix compile error in dnscrypt.
        - Fix _vfixed not Used, removed from sbuffer code,
          reported by X41 D-Sec.
+       - Fix Hardcoded Constant, reported by X41 D-Sec.
 
 2 December 2019: Wouter
        - Merge pull request #122 from he32: In tcp_callback_writer(),
index f827d848d354add07b8300642ee04d4a4043b748..d0d1632d407df3e57f28805cedba3ab73e8ab5f6 100644 (file)
@@ -22,6 +22,7 @@
 #include "sldns/parseutil.h"
 #include "sldns/sbuffer.h"
 #include "sldns/keyraw.h"
+#include "util/data/dname.h"
 #ifdef HAVE_TIME_H
 #include <time.h>
 #endif
@@ -784,7 +785,7 @@ int sldns_wire2str_dname_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen,
        /* spool labels onto the string, use compression if its there */
        uint8_t* pos = *d;
        unsigned i, counter=0;
-       unsigned maxcompr = 256; /* loop detection, max compr ptrs */
+       unsigned maxcompr = MAX_COMPRESS_PTRS; /* loop detection, max compr ptrs */
        int in_buf = 1;
        if(comprloop) {
                if(*comprloop != 0)