]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
msgunfmt: Error on incomplete multibyte sequence at EOF
authorDaiki Ueno <ueno@gnu.org>
Wed, 8 Oct 2014 07:12:35 +0000 (16:12 +0900)
committerDaiki Ueno <ueno@gnu.org>
Wed, 8 Oct 2014 07:12:35 +0000 (16:12 +0900)
* write-po.c (wrap): Report error on incomplete multibyte sequence
at the end of input bytes.
Reported by Jakub Wilk at:
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=763820>.

gettext-tools/src/ChangeLog
gettext-tools/src/write-po.c

index f605cb815b56eb776b0b679ce660981b75df992c..32e4b96e49a3fbbebc651989be8b50d6842e9ece 100644 (file)
@@ -1,3 +1,10 @@
+2014-10-08  Daiki Ueno  <ueno@gnu.org>
+
+       * write-po.c (wrap): Report error on incomplete multibyte sequence
+       at the end of input bytes.
+       Reported by Jakub Wilk at:
+       <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=763820>.
+
 2014-09-30  Daiki Ueno  <ueno@gnu.org>
 
        * x-c.c (literalstring_parse): Fix octal character escape handling.
index cee086f6c815d914f496ccb4649f760e539c300f..d49a95fabcce73e9883c0687dbd82972e5b9ff74 100644 (file)
@@ -812,6 +812,15 @@ wrap (const message_ty *mp, ostream_t stream,
                                      _("invalid multibyte sequence"));
                           continue;
                         }
+                      else if (errno == EINVAL)
+                        {
+                          /* This could happen if an incomplete
+                             multibyte sequence at the end of input
+                             bytes.  */
+                          po_xerror (PO_SEVERITY_ERROR, mp, NULL, 0, 0, false,
+                                     _("incomplete multibyte sequence"));
+                          continue;
+                        }
                       else
                         abort ();
                     }