From: W.C.A. Wijngaards Date: Tue, 3 Dec 2019 16:23:38 +0000 (+0100) Subject: - Fix Hardcoded Constant, reported by X41 D-Sec. X-Git-Tag: release-1.9.6rc1~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4106308bd5e92f819604ed8c75fdbf39bf04b905;p=thirdparty%2Funbound.git - Fix Hardcoded Constant, reported by X41 D-Sec. --- diff --git a/doc/Changelog b/doc/Changelog index 08a225157..05af5220d 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -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(), diff --git a/sldns/wire2str.c b/sldns/wire2str.c index f827d848d..d0d1632d4 100644 --- a/sldns/wire2str.c +++ b/sldns/wire2str.c @@ -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 #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)