From: Bruno Haible Date: Wed, 11 Jul 2001 16:33:31 +0000 (+0000) Subject: Don't treat strings with a trailing % sign as C format strings. X-Git-Tag: v0.11~613 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8b92b2dc40daa77926d200a3a94828e14112c73;p=thirdparty%2Fgettext.git Don't treat strings with a trailing % sign as C format strings. --- diff --git a/src/ChangeLog b/src/ChangeLog index 04a11eacb..5dd8a08c5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2001-07-11 Bruno Haible + + * xgettext.c (test_whether_c_format): When encountering an + unterminated % format specifier, return 'impossible'. + Reported by Gaute B Strokkenes . + 2001-07-09 Bruno Haible * write-po.c (has_nonascii): New function. diff --git a/src/xgettext.c b/src/xgettext.c index 9d3a59981..fda37e995 100644 --- a/src/xgettext.c +++ b/src/xgettext.c @@ -1408,7 +1408,8 @@ test_whether_c_format (s) size_t dummy; (void) parse_one_spec (s, 0, &spec, &dummy); - if (strchr ("iduoxXeEfgGcspnm%", spec.info.spec) == NULL) + if (spec.info.spec == '\0' + || strchr ("iduoxXeEfgGcspnm%", spec.info.spec) == NULL) return impossible; }