From f1fcd1080a08abf3c350d3c0a3a76868df3ed4d2 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 10 Aug 2001 08:58:42 +0000 Subject: 2001-08-10 Roland McGrath * showtrans.c (main): Use %.*s formats to be robust in the face of an unterminated argz in a translator setting. --- utils/showtrans.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'utils/showtrans.c') diff --git a/utils/showtrans.c b/utils/showtrans.c index dbbada75..ab3ad486 100644 --- a/utils/showtrans.c +++ b/utils/showtrans.c @@ -1,8 +1,7 @@ /* Show files' passive translators. - Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. - - Written by Miles Bader + Copyright (C) 1995,96,97,98,99,2001 Free Software Foundation, Inc. + Written by Miles Bader This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -80,9 +79,9 @@ main (int argc, char *argv[]) if (!silent) { if (print_prefix) - printf ("%s: %s\n", name, trans); + printf ("%s: %.*s\n", name, trans_len, trans); else - puts (trans); + printf ("%.*s\n", trans_len, trans); } if (trans != buf) -- cgit v1.2.3