Mercurial > hg > octave-kai > gnulib-hg
changeset 16241:76e0e719ee49
argp: Avoid crash if translator uses % characters in a translation.
* lib/argp-parse.c (argp_version_parser): Use a "%s" format string.
Reported by Mats Erik Andersson <gnu@gisladisker.se>.
author | Guillem Jover <guillem@hadrons.org> |
---|---|
date | Sat, 07 Jan 2012 01:42:41 +0100 |
parents | 9fb16282cf63 |
children | 59c686e5b2df |
files | ChangeLog lib/argp-parse.c |
diffstat | 2 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-01-06 Guillem Jover <guillem@hadrons.org> (tiny change) + + argp: Avoid crash if translator uses % characters in a translation. + * lib/argp-parse.c (argp_version_parser): Use a "%s" format string. + Reported by Mats Erik Andersson <gnu@gisladisker.se>. + 2012-01-06 Paul Eggert <eggert@cs.ucla.edu> doc: C11 and C++11 are now official
--- a/lib/argp-parse.c +++ b/lib/argp-parse.c @@ -154,8 +154,9 @@ else if (argp_program_version) fprintf (state->out_stream, "%s\n", argp_program_version); else - __argp_error (state, dgettext (state->root_argp->argp_domain, - "(PROGRAM ERROR) No version known!?")); + __argp_error (state, "%s", + dgettext (state->root_argp->argp_domain, + "(PROGRAM ERROR) No version known!?")); if (! (state->flags & ARGP_NO_EXIT)) exit (0); break;