From 597db8fdaaa65f02bb1e53dfc942b4e1a3b493ff Mon Sep 17 00:00:00 2001 From: schwarze Date: Sun, 5 Jan 2014 21:21:08 +0000 Subject: [PATCH] Fix one case where a non-literal is used as format string. Fix another case where a variable is formatted using the wrong type. Patch from Joerg Sonnenberger . --- usr.bin/mandoc/html.c | 4 ++-- usr.bin/mandoc/term_ps.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.bin/mandoc/html.c b/usr.bin/mandoc/html.c index f35df3032d1..5b080a48dc5 100644 --- a/usr.bin/mandoc/html.c +++ b/usr.bin/mandoc/html.c @@ -1,4 +1,4 @@ -/* $Id: html.c,v 1.31 2013/08/08 20:07:24 schwarze Exp $ */ +/* $Id: html.c,v 1.32 2014/01/05 21:21:08 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2011, 2012, 2013 Ingo Schwarze @@ -718,7 +718,7 @@ buffmt_man(struct html *h, bufcat(h, sec ? sec : "1"); break; case('N'): - bufcat_fmt(h, name); + bufcat_fmt(h, "%s", name); break; default: bufncat(h, p, 2); diff --git a/usr.bin/mandoc/term_ps.c b/usr.bin/mandoc/term_ps.c index bba77047276..2fd0ee73bfc 100644 --- a/usr.bin/mandoc/term_ps.c +++ b/usr.bin/mandoc/term_ps.c @@ -1,4 +1,4 @@ -/* $Id: term_ps.c,v 1.19 2011/10/16 12:18:32 schwarze Exp $ */ +/* $Id: term_ps.c,v 1.20 2014/01/05 21:21:08 schwarze Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons * @@ -824,7 +824,7 @@ ps_begin(struct termp *p) ps_printf(p, "<<\n"); ps_printf(p, "/Type /Font\n"); ps_printf(p, "/Subtype /Type1\n"); - ps_printf(p, "/Name /F%zu\n", i); + ps_printf(p, "/Name /F%d\n", i); ps_printf(p, "/BaseFont /%s\n", fonts[i].name); ps_printf(p, ">>\n"); } -- 2.20.1