[Po4a-commits] "po4a changelog,1.432,1.433 po4a,1.83,1.84"

Nicolas FRANCOIS nekral-guest at alioth.debian.org
Tue Feb 10 21:08:00 UTC 2009


Update of /cvsroot/po4a/po4a
In directory alioth:/tmp/cvs-serv21330

Modified Files:
	changelog po4a 
Log Message:
	* po4a: Fail with an error if options cannot be parsed (instead of
	infinite loop).


Index: po4a
===================================================================
RCS file: /cvsroot/po4a/po4a/po4a,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- po4a	29 Dec 2008 13:16:39 -0000	1.83
+++ po4a	10 Feb 2009 21:07:58 -0000	1.84
@@ -783,11 +783,16 @@
 
 sub split_opts {
     my $options = shift;
+    my $options_orig = $options;
     my @opts = ();
     $options =~ s/\\"/"/g;
     while (length $options) {
         my $o = "";
         while (length $options and $options !~ /^ /s) {
+            if (    ($options =~ m/^(["'])/)
+                and ($options !~ m/^(["'])(?:\\.|(?!\1)[^\\])*\1/)) {
+                die wrap_msg(gettext("Cannot parse option line (missing >%s<?): %s"), $1, $options_orig);
+            }
             # Extract non quoted parts
             $options =~ s/^([^\\"' ]*)//s;
             $o .= $1 if defined $1;

Index: changelog
===================================================================
RCS file: /cvsroot/po4a/po4a/changelog,v
retrieving revision 1.432
retrieving revision 1.433
diff -u -d -r1.432 -r1.433
--- changelog	10 Feb 2009 20:43:49 -0000	1.432
+++ changelog	10 Feb 2009 21:07:58 -0000	1.433
@@ -1,3 +1,8 @@
+2009-02-10  Nicolas François  <nicolas.francois at centraliens.net>
+
+	* po4a: Fail with an error if options cannot be parsed (instead of
+	infinite loop).
+
 2009-02-10  Martin Quinson  <mquinson at debian.org>
 
 	* lib/Locale/Po4a/Xml.pm: Reset @path in initialize(). This is




More information about the Po4a-commits mailing list