diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-03-28 19:17:12 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-03-28 19:17:12 +0000 |
commit | 3807ee23c5f7bfedf0aeb8a013b458325092265b (patch) | |
tree | d76b245c52f5f180e46dfbf8422f71b3ac691901 /mansearch.c | |
parent | d82f070a5c49198d0d568df3940dfca1d933926d (diff) | |
download | mandoc-3807ee23c5f7bfedf0aeb8a013b458325092265b.tar.gz |
Properly initialize malloc(3)ed memory.
With this bug fix, partly unitialized memory could sometimes be
returned, sometimes causing crashes by bogus free(3)s in apropos(1).
Diffstat (limited to 'mansearch.c')
-rw-r--r-- | mansearch.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mansearch.c b/mansearch.c index ff502daf..cfd14bf6 100644 --- a/mansearch.c +++ b/mansearch.c @@ -310,6 +310,7 @@ buildnames(struct manpage *mpage, sqlite3 *db, sqlite3_stmt *s, size_t i; int c; + mpage->file = NULL; mpage->names = NULL; prevsec = prevarch = NULL; i = 1; |