diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-04-18 13:57:56 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-04-18 13:57:56 +0000 |
commit | 135480d0ab61464405f81a700409bf21bb994017 (patch) | |
tree | 9f3f1b0e4f045b2355d75c2ab8367618da788abb | |
parent | c7a44df70eae152539b7cfc86ee59652ec3eacfa (diff) | |
download | mandoc-135480d0ab61464405f81a700409bf21bb994017.tar.gz |
Fix previous: i forgot explicit NUL termination;
noticed by Gonzalo <Tornaria at cmat dot edu dot uy>, thanks!
-rw-r--r-- | mansearch.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; } |