source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Fix previous: i forgot explicit NUL termination; noticed by
@ 2017-04-18 13:58 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2017-04-18 13:58 UTC (permalink / raw)
  To: source

Log Message:
-----------
Fix previous: i forgot explicit NUL termination;
noticed by Gonzalo <Tornaria at cmat dot edu dot uy>, thanks!

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

Revision Data
-------------
Index: mansearch.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/mansearch.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -Lmansearch.c -Lmansearch.c -u -p -r1.70 -r1.71
--- mansearch.c
+++ mansearch.c
@@ -516,6 +516,8 @@ buildoutput(size_t im, struct dbm_page *
 		output = mandoc_malloc(sz);
 		i = 0;
 		lstcat(output, &i, input, " # ");
+		output[i++] = '\0';
+		assert(i == sz);
 		return output;
 	}
 
--
 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:[~2017-04-18 13:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-18 13:58 mdocml: Fix previous: i forgot explicit NUL termination; noticed by 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).