Revision: 6489 http://ipcop.svn.sourceforge.net/ipcop/?rev=6489&view=rev Author: gespinasse Date: 2012-03-18 08:54:20 +0000 (Sun, 18 Mar 2012) Log Message: ----------- While mostly ready to close the windows on gettext git tree, I found this bug fixed on malformed translation. I see too that we do not apply the advice given that would prevent the issue : always use msgfmt --check, implying --check-format, --check-header, --check-domain
I only added --check-format because our translation system miss some of the headers. Modified Paths: -------------- ipcop/trunk/lfs/gettext ipcop/trunk/lfs/ipcop-lang Added Paths: ----------- ipcop/trunk/src/patches/gettext-0.18.1.1_printf.patch Modified: ipcop/trunk/lfs/gettext =================================================================== --- ipcop/trunk/lfs/gettext 2012-03-17 11:59:36 UTC (rev 6488) +++ ipcop/trunk/lfs/gettext 2012-03-18 08:54:20 UTC (rev 6489) @@ -85,6 +85,8 @@ # Upstream know : http://lists.gnu.org/archive/html/bug-gnu-utils/2011-01/msg00041.html # libcroco part is in libcroco-0.64, unsure if libgrep part will be applied cd $(DIR_APP) && patch -p1 -i $(DIR_PATCHES)/$(THISAPP)_format-string.patch + # From upstream, fix a segv with malformed string + cd $(DIR_APP) && patch -p1 -i $(DIR_PATCHES)/$(THISAPP)_printf.patch ifeq "$(STAGE)" "toolchain" cd $(DIR_APP)/gettext-tools && EMACS="no" ./configure --prefix=/$(TOOLS_DIR) --disable-shared --disable-nls Modified: ipcop/trunk/lfs/ipcop-lang =================================================================== --- ipcop/trunk/lfs/ipcop-lang 2012-03-17 11:59:36 UTC (rev 6488) +++ ipcop/trunk/lfs/ipcop-lang 2012-03-18 08:54:20 UTC (rev 6489) @@ -63,13 +63,16 @@ # List of translated languages cp $(DIR_SRC)/langs/list /var/ipcop/main/language.lst + # Translations should be checked with msgfmt --check, only using --check-format as actually, + # some headers are missing : Project-Id-Version, PO-Revision-Date, Last-Translator, Language-Team, MIME-Version, Language + # Locale files for GUI # Unfortunately, list_progress match langs/*_*, so filter that name for now with sed. # Replace with *_* after in, once list_progress is renamed cd $(DIR_SRC)/langs && for i in `ls -d *_* | sed "s|list_progress||"`; do \ echo "Processing $$i for GUI"; \ mkdir -p /usr/share/locale/$$i/LC_MESSAGES; \ - msgfmt $(DIR_SRC)/langs/$$i/ipcop.po -o /usr/share/locale/$$i/LC_MESSAGES/ipcop.mo; \ + msgfmt --check-format $(DIR_SRC)/langs/$$i/ipcop.po -o /usr/share/locale/$$i/LC_MESSAGES/ipcop.mo; \ localedef -i $$i -f UTF-8 $$i.utf8 --no-archive; \ done @@ -77,7 +80,7 @@ for i in `grep -v "no-installer" $(DIR_SRC)/langs/list | cut -d ':' -f 2` ; do \ echo "Processing $$i for installer"; \ mkdir -p /usr/share/locale/$$i/LC_MESSAGES; \ - msgfmt $(DIR_SRC)/langs/$$i/install.po -o /usr/share/locale/$$i/LC_MESSAGES/install.mo; \ + msgfmt --check-format $(DIR_SRC)/langs/$$i/install.po -o /usr/share/locale/$$i/LC_MESSAGES/install.mo; \ done # Locale files for installer are created later in initramfs Added: ipcop/trunk/src/patches/gettext-0.18.1.1_printf.patch =================================================================== --- ipcop/trunk/src/patches/gettext-0.18.1.1_printf.patch (rev 0) +++ ipcop/trunk/src/patches/gettext-0.18.1.1_printf.patch 2012-03-18 08:54:20 UTC (rev 6489) @@ -0,0 +1,34 @@ +http://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=1a1831be04f634375c7e7c56cac7ec2f4167e863 + + Avoid crash in *printf functions for invalid format string with dollar. + * printf.c (libintl_vsnprintf, libintl_vswprintf): Don't crash in + mempy if libintl_vasnprintf returned NULL. + Reported by Jeong, Heon <bimar...@gmail.com> + in <https://savannah.gnu.org/bugs/?34555>. + +2011-10-15 Bruno Haible <br...@clisp.org> + + +diff --git a/gettext-runtime/intl/printf.c b/gettext-runtime/intl/printf.c +index 157853a..0369e87 100644 +--- a/gettext-runtime/intl/printf.c ++++ b/gettext-runtime/intl/printf.c +@@ -213,6 +213,8 @@ libintl_vsnprintf (char *resultbuf, size_t length, const char *format, va_list a + { + size_t maxlength = length; + char *result = libintl_vasnprintf (resultbuf, &length, format, args); ++ if (result == NULL) ++ return -1; + if (result != resultbuf) + { + if (maxlength > 0) +@@ -388,6 +390,8 @@ libintl_vswprintf (wchar_t *resultbuf, size_t length, const wchar_t *format, va_ + { + size_t maxlength = length; + wchar_t *result = libintl_vasnwprintf (resultbuf, &length, format, args); ++ if (result == NULL) ++ return -1; + if (result != resultbuf) + { + if (maxlength > 0) + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ Ipcop-svn mailing list Ipcop-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ipcop-svn