aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhong Tran <tranmanphong@gmail.com>2017-12-18 14:08:08 -0800
committerRoss Burton <ross.burton@intel.com>2017-12-19 19:54:57 +0000
commite154211af41329265f43d22bc30b4158db28ef79 (patch)
treeb9473ce7db79e3ce7a90d344547fd6c0617ae762
parent672845b9d0841de58b6a954d25fe6ee1ab7c333d (diff)
downloadmeta-gplv2-e154211af41329265f43d22bc30b4158db28ef79.tar.gz
meta-gplv2-e154211af41329265f43d22bc30b4158db28ef79.tar.bz2
meta-gplv2-e154211af41329265f43d22bc30b4158db28ef79.zip
gettext: fix compilation with securityflags enabled
Signed-off-by: Phong Tran <tranmanphong@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--recipes-core/gettext/gettext-0.16.1/0001-gettext-libgrep-fix-compile-error-Werror-format-secu.patch88
-rw-r--r--recipes-core/gettext/gettext_0.16.1.bb1
2 files changed, 89 insertions, 0 deletions
diff --git a/recipes-core/gettext/gettext-0.16.1/0001-gettext-libgrep-fix-compile-error-Werror-format-secu.patch b/recipes-core/gettext/gettext-0.16.1/0001-gettext-libgrep-fix-compile-error-Werror-format-secu.patch
new file mode 100644
index 0000000..d51513d
--- /dev/null
+++ b/recipes-core/gettext/gettext-0.16.1/0001-gettext-libgrep-fix-compile-error-Werror-format-secu.patch
@@ -0,0 +1,88 @@
+From b0e57fc44ee102c668f13a324360fb2f27ee7538 Mon Sep 17 00:00:00 2001
+From: Phong Tran <tranmanphong@gmail.com>
+Date: Fri, 8 Dec 2017 07:56:58 +0700
+Subject: [PATCH] gettext libgrep fix compile error -Werror=format-security
+
+---
+ gettext-tools/libgrep/m-fgrep.c | 4 ++--
+ gettext-tools/libgrep/m-regex.c | 12 ++++++------
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/gettext-tools/libgrep/m-fgrep.c b/gettext-tools/libgrep/m-fgrep.c
+index 28f900c..2e49a74 100644
+--- a/gettext-tools/libgrep/m-fgrep.c
++++ b/gettext-tools/libgrep/m-fgrep.c
+@@ -55,7 +55,7 @@ Fcompile (const char *pattern, size_t pattern_size,
+ for (lim = beg; lim < pattern + pattern_size && *lim != '\n'; ++lim)
+ ;
+ if ((err = kwsincr (ckwset->kwset, beg, lim - beg)) != NULL)
+- error (exit_failure, 0, err);
++ error (exit_failure, 0, "%s", err);
+ if (lim < pattern + pattern_size)
+ ++lim;
+ beg = lim;
+@@ -63,7 +63,7 @@ Fcompile (const char *pattern, size_t pattern_size,
+ while (beg < pattern + pattern_size);
+
+ if ((err = kwsprep (ckwset->kwset)) != NULL)
+- error (exit_failure, 0, err);
++ error (exit_failure, 0, "%s", err);
+ return ckwset;
+ }
+
+diff --git a/gettext-tools/libgrep/m-regex.c b/gettext-tools/libgrep/m-regex.c
+index 6f7aae3..70f04b3 100644
+--- a/gettext-tools/libgrep/m-regex.c
++++ b/gettext-tools/libgrep/m-regex.c
+@@ -73,7 +73,7 @@ struct compiled_regex {
+ void
+ dfaerror (const char *mesg)
+ {
+- error (exit_failure, 0, mesg);
++ error (exit_failure, 0, "%s", mesg);
+ }
+
+ /* If the DFA turns out to have some set of fixed strings one of
+@@ -99,7 +99,7 @@ kwsmusts (struct compiled_regex *cregex,
+ continue;
+ cregex->kwset_exact_matches++;
+ if ((err = kwsincr (cregex->ckwset.kwset, dm->must, strlen (dm->must))) != NULL)
+- error (exit_failure, 0, err);
++ error (exit_failure, 0, "%s", err);
+ }
+ /* Now, we compile the substrings that will require
+ the use of the regexp matcher. */
+@@ -108,10 +108,10 @@ kwsmusts (struct compiled_regex *cregex,
+ if (dm->exact)
+ continue;
+ if ((err = kwsincr (cregex->ckwset.kwset, dm->must, strlen (dm->must))) != NULL)
+- error (exit_failure, 0, err);
++ error (exit_failure, 0, "%s", err);
+ }
+ if ((err = kwsprep (cregex->ckwset.kwset)) != NULL)
+- error (exit_failure, 0, err);
++ error (exit_failure, 0, "%s", err);
+ }
+ }
+
+@@ -161,7 +161,7 @@ Gcompile (const char *pattern, size_t pattern_size,
+
+ if ((err = re_compile_pattern (motif, len,
+ &(cregex->patterns[cregex->pcount].regexbuf))) != NULL)
+- error (exit_failure, 0, err);
++ error (exit_failure, 0, "%s", err);
+ cregex->pcount++;
+
+ motif = sep;
+@@ -247,7 +247,7 @@ compile (const char *pattern, size_t pattern_size,
+
+ if ((err = re_compile_pattern (motif, len,
+ &(cregex->patterns[cregex->pcount].regexbuf))) != NULL)
+- error (exit_failure, 0, err);
++ error (exit_failure, 0, "%s", err);
+ cregex->pcount++;
+
+ motif = sep;
+--
+2.7.4
+
diff --git a/recipes-core/gettext/gettext_0.16.1.bb b/recipes-core/gettext/gettext_0.16.1.bb
index e79f4da..dacdfd3 100644
--- a/recipes-core/gettext/gettext_0.16.1.bb
+++ b/recipes-core/gettext/gettext_0.16.1.bb
@@ -19,6 +19,7 @@ SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \
file://fix_aclocal_version.patch \
file://fix_gnu_source_circular.patch \
file://hardcode_macro_version.patch \
+ file://0001-gettext-libgrep-fix-compile-error-Werror-format-secu.patch \
"
SRC_URI[md5sum] = "3d9ad24301c6d6b17ec30704a13fe127"