From 581f975b382a8fa0c10a6d5b34e422cee0a6e1b7 Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Thu, 3 May 2018 14:09:33 +0000 Subject: [PATCH] - Fix gcc 8 buffer warning in testcode. git-svn-id: file:///svn/unbound/trunk@4675 be551aaa-1e26-0410-a405-d3ace91eadb9 --- doc/Changelog | 1 + testcode/testbound.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/Changelog b/doc/Changelog index a4034b714..47b3a7c07 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,5 +1,6 @@ 3 May 2018: Wouter - Fix that configure --with-libhiredis also turns on cachedb. + - Fix gcc 8 buffer warning in testcode. 2 May 2018: Wouter - Fix fail to reject dead peers in forward-zone, with ssl-upstream. diff --git a/testcode/testbound.c b/testcode/testbound.c index 56b89c7f0..071ac9c2a 100644 --- a/testcode/testbound.c +++ b/testcode/testbound.c @@ -177,7 +177,8 @@ spool_temp_file(FILE* in, int* lineno, char* id) while(isspace((unsigned char)*parse)) parse++; if(strncmp(parse, "$INCLUDE_TEMPFILE", 17) == 0) { - char l2[MAX_LINE_LEN]; + char l2[MAX_LINE_LEN-30]; /* -30 makes it fit with + a preceding $INCLUDE in the buf line[] */ char* tid = parse+17; while(isspace((unsigned char)*tid)) tid++;