]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Don't treat strings with a trailing % sign as C format strings.
authorBruno Haible <bruno@clisp.org>
Wed, 11 Jul 2001 16:33:31 +0000 (16:33 +0000)
committerBruno Haible <bruno@clisp.org>
Wed, 11 Jul 2001 16:33:31 +0000 (16:33 +0000)
src/ChangeLog
src/xgettext.c

index 04a11eacbe68927116868f3f56a9cf0911cfb0ec..5dd8a08c562377d1107c7ae06cdc9453b781553d 100644 (file)
@@ -1,3 +1,9 @@
+2001-07-11  Bruno Haible  <haible@clisp.cons.org>
+
+       * xgettext.c (test_whether_c_format): When encountering an
+       unterminated % format specifier, return 'impossible'.
+       Reported by Gaute B Strokkenes <gs234@cam.ac.uk>.
+
 2001-07-09  Bruno Haible  <haible@clisp.cons.org>
 
        * write-po.c (has_nonascii): New function.
index 9d3a5998119cbd5ceca85ba23385534f4b591a0b..fda37e9959889eebd032b9459ea02bdf4fd80a9a 100644 (file)
@@ -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;
     }