After commit
6aa7b7ed in 2009, xgettext assumed that ARGNUM1 and
ARGNUM2 of -k are different. That could cause an double-free in
exceptional cases.
Reported by Johan Liljegren in:
<https://lists.gnu.org/archive/html/bug-gettext/2014-10/msg00028.html>.
* xgettext.c (arglist_parser_remember_literal): Don't assume that
ARGNUM1 and ARGNUM2 are different.
+2014-10-28 Daiki Ueno <ueno@gnu.org>
+
+ xgettext: Fix double-free in singular/plural argument extraction
+ After commit 6aa7b7ed in 2009, xgettext assumed that ARGNUM1 and
+ ARGNUM2 of -k are different. That could cause an double-free in
+ exceptional cases.
+ Reported by Johan Liljegren in:
+ <https://lists.gnu.org/archive/html/bug-gettext/2014-10/msg00028.html>.
+ * xgettext.c (arglist_parser_remember_literal): Don't assume that
+ ARGNUM1 and ARGNUM2 are different.
+
2014-10-15 Daiki Ueno <ueno@gnu.org>
* gettext 0.19.3 released.
/* Mark msgid as done. */
cp->argnum1 = 0;
}
- if (argnum == cp->argnum2)
+ else if (argnum == cp->argnum2)
{
cp->msgid_plural = string;
cp->msgid_plural_escape = type;