From: Daiki Ueno Date: Mon, 14 Jul 2014 02:55:01 +0000 (+0900) Subject: vala: Fix empty string literal handling X-Git-Tag: v0.19.2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17c15b507f1b8eab92e2a6c80b48d2b6871671c3;p=thirdparty%2Fgettext.git vala: Fix empty string literal handling Similar to the commit 7b2d8d61 on July 11. * x-vala.c (phase3_get): Add missing memory allocation for empty string literal. --- diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index c68deb578..c0826b782 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,10 @@ +2014-07-14 Daiki Ueno + + vala: Fix empty string literal handling + Similar to the commit 7b2d8d61 on July 11. + * x-vala.c (phase3_get): Add missing memory allocation for empty + string literal. + 2014-07-14 Daiki Ueno build: Fix race in post-install removal of *.a diff --git a/gettext-tools/src/x-vala.c b/gettext-tools/src/x-vala.c index 288f9b7f5..b88b220f3 100644 --- a/gettext-tools/src/x-vala.c +++ b/gettext-tools/src/x-vala.c @@ -764,6 +764,11 @@ phase3_get (token_ty *tp) break; } } + if (bufpos >= bufmax) + { + bufmax = 2 * bufmax + 10; + buffer = xrealloc (buffer, bufmax); + } buffer[bufpos] = 0; tp->type = last_token_type = template ? token_type_string_template : token_type_string_literal;