diff options
author | 2014-01-05 21:21:08 +0000 | |
---|---|---|
committer | 2014-01-05 21:21:08 +0000 | |
commit | 597db8fdaaa65f02bb1e53dfc942b4e1a3b493ff (patch) | |
tree | d28d58036c28243eb99c71c5c77d7fed6086ab99 | |
parent | Merge NetBSD rev. 1.4: (diff) | |
download | wireguard-openbsd-597db8fdaaa65f02bb1e53dfc942b4e1a3b493ff.tar.xz wireguard-openbsd-597db8fdaaa65f02bb1e53dfc942b4e1a3b493ff.zip |
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 <joerg@NetBSD>.
-rw-r--r-- | usr.bin/mandoc/html.c | 4 | ||||
-rw-r--r-- | 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 <kristaps@bsd.lv> * Copyright (c) 2011, 2012, 2013 Ingo Schwarze <schwarze@openbsd.org> @@ -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 <kristaps@bsd.lv> * @@ -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"); } |