summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2001-08-10 08:58:42 +0000
committerRoland McGrath <roland@gnu.org>2001-08-10 08:58:42 +0000
commitf1fcd1080a08abf3c350d3c0a3a76868df3ed4d2 (patch)
tree6ccc04214d275c5824352e895fa936466edd0513 /utils
parentff09a44bc18177ba1253a8d3e1c9fbe3ebe5b768 (diff)
2001-08-10 Roland McGrath <roland@frob.com>
* showtrans.c (main): Use %.*s formats to be robust in the face of an unterminated argz in a translator setting.
Diffstat (limited to 'utils')
-rw-r--r--utils/showtrans.c9
1 files changed, 4 insertions, 5 deletions
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 <miles@gnu.ai.mit.edu>
+ Copyright (C) 1995,96,97,98,99,2001 Free Software Foundation, Inc.
+ Written by Miles Bader <miles@gnu.org>
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)