From 4106308bd5e92f819604ed8c75fdbf39bf04b905 Mon Sep 17 00:00:00 2001 From: "W.C.A. Wijngaards" Date: Tue, 3 Dec 2019 17:23:38 +0100 Subject: [PATCH] - Fix Hardcoded Constant, reported by X41 D-Sec. --- doc/Changelog | 1 + sldns/wire2str.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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) -- 2.47.3