From 135480d0ab61464405f81a700409bf21bb994017 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Tue, 18 Apr 2017 13:57:56 +0000 Subject: Fix previous: i forgot explicit NUL termination; noticed by Gonzalo , thanks! --- mansearch.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mansearch.c b/mansearch.c index 85920d0f..1a5eba7f 100644 --- a/mansearch.c +++ b/mansearch.c @@ -516,6 +516,8 @@ buildoutput(size_t im, struct dbm_page *page) output = mandoc_malloc(sz); i = 0; lstcat(output, &i, input, " # "); + output[i++] = '\0'; + assert(i == sz); return output; } -- cgit