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 | f81dd1c2968cfaa2ccb3fc5cc68f4915ff10c312 (patch) | |
tree | 7beefc348b3ea17e9c9b4fb560dcc40ff2093c55 /mansearch.c | |
parent | 39d04e66c984c4a1e5987b9abef08943d2ba3ca0 (diff) | |
download | mandoc-f81dd1c2968cfaa2ccb3fc5cc68f4915ff10c312.tar.gz mandoc-f81dd1c2968cfaa2ccb3fc5cc68f4915ff10c312.tar.zst mandoc-f81dd1c2968cfaa2ccb3fc5cc68f4915ff10c312.zip |
Fix previous: i forgot explicit NUL termination;
noticed by Gonzalo <Tornaria at cmat dot edu dot uy>, thanks!
Diffstat (limited to 'mansearch.c')
-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; } |