source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Properly initialize malloc(3)ed memory.
@ 2014-03-28 19:17 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2014-03-28 19:17 UTC (permalink / raw)
  To: source

Log Message:
-----------
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).

Modified Files:
--------------
    mdocml:
        mansearch.c

Revision Data
-------------
Index: mansearch.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mansearch.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -Lmansearch.c -Lmansearch.c -u -p -r1.24 -r1.25
--- mansearch.c
+++ mansearch.c
@@ -310,6 +310,7 @@ buildnames(struct manpage *mpage, sqlite
 	size_t		 i;
 	int		 c;
 
+	mpage->file = NULL;
 	mpage->names = NULL;
 	prevsec = prevarch = NULL;
 	i = 1;
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-03-28 19:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-28 19:17 mdocml: Properly initialize malloc(3)ed memory schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).