From a5027f5f568604ee04f8b60f5f6dbdf454bf70e2 Mon Sep 17 00:00:00 2001 From: "W.C.A. Wijngaards" Date: Thu, 15 Aug 2019 15:11:04 +0200 Subject: [PATCH] - Fix character buffer size in ub_ctx_hosts. --- doc/Changelog | 1 + libunbound/libunbound.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/Changelog b/doc/Changelog index 786f3c3e6..62989f009 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -3,6 +3,7 @@ - Fix autotrust temp file uniqueness windows compile. - avoid warning about upcast on 32bit systems for autotrust. - escape commandline contents for -V. + - Fix character buffer size in ub_ctx_hosts. 14 August 2019: George - Fix #59, when compiled with systemd support check that we can properly diff --git a/libunbound/libunbound.c b/libunbound/libunbound.c index 263dde5a4..63770cc02 100644 --- a/libunbound/libunbound.c +++ b/libunbound/libunbound.c @@ -1159,7 +1159,7 @@ int ub_ctx_hosts(struct ub_ctx* ctx, const char* fname) { FILE* in; - char buf[1024], ldata[1024]; + char buf[1024], ldata[2048]; char* parse, *addr, *name, *ins; lock_basic_lock(&ctx->cfglock); if(ctx->finalized) {