summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 @@
1From b0e57fc44ee102c668f13a324360fb2f27ee7538 Mon Sep 17 00:00:00 2001
2From: Phong Tran <tranmanphong@gmail.com>
3Date: Fri, 8 Dec 2017 07:56:58 +0700
4Subject: [PATCH] gettext libgrep fix compile error -Werror=format-security
5
6---
7 gettext-tools/libgrep/m-fgrep.c | 4 ++--
8 gettext-tools/libgrep/m-regex.c | 12 ++++++------
9 2 files changed, 8 insertions(+), 8 deletions(-)
10
11diff --git a/gettext-tools/libgrep/m-fgrep.c b/gettext-tools/libgrep/m-fgrep.c
12index 28f900c..2e49a74 100644
13--- a/gettext-tools/libgrep/m-fgrep.c
14+++ b/gettext-tools/libgrep/m-fgrep.c
15@@ -55,7 +55,7 @@ Fcompile (const char *pattern, size_t pattern_size,
16 for (lim = beg; lim < pattern + pattern_size && *lim != '\n'; ++lim)
17 ;
18 if ((err = kwsincr (ckwset->kwset, beg, lim - beg)) != NULL)
19- error (exit_failure, 0, err);
20+ error (exit_failure, 0, "%s", err);
21 if (lim < pattern + pattern_size)
22 ++lim;
23 beg = lim;
24@@ -63,7 +63,7 @@ Fcompile (const char *pattern, size_t pattern_size,
25 while (beg < pattern + pattern_size);
26
27 if ((err = kwsprep (ckwset->kwset)) != NULL)
28- error (exit_failure, 0, err);
29+ error (exit_failure, 0, "%s", err);
30 return ckwset;
31 }
32
33diff --git a/gettext-tools/libgrep/m-regex.c b/gettext-tools/libgrep/m-regex.c
34index 6f7aae3..70f04b3 100644
35--- a/gettext-tools/libgrep/m-regex.c
36+++ b/gettext-tools/libgrep/m-regex.c
37@@ -73,7 +73,7 @@ struct compiled_regex {
38 void
39 dfaerror (const char *mesg)
40 {
41- error (exit_failure, 0, mesg);
42+ error (exit_failure, 0, "%s", mesg);
43 }
44
45 /* If the DFA turns out to have some set of fixed strings one of
46@@ -99,7 +99,7 @@ kwsmusts (struct compiled_regex *cregex,
47 continue;
48 cregex->kwset_exact_matches++;
49 if ((err = kwsincr (cregex->ckwset.kwset, dm->must, strlen (dm->must))) != NULL)
50- error (exit_failure, 0, err);
51+ error (exit_failure, 0, "%s", err);
52 }
53 /* Now, we compile the substrings that will require
54 the use of the regexp matcher. */
55@@ -108,10 +108,10 @@ kwsmusts (struct compiled_regex *cregex,
56 if (dm->exact)
57 continue;
58 if ((err = kwsincr (cregex->ckwset.kwset, dm->must, strlen (dm->must))) != NULL)
59- error (exit_failure, 0, err);
60+ error (exit_failure, 0, "%s", err);
61 }
62 if ((err = kwsprep (cregex->ckwset.kwset)) != NULL)
63- error (exit_failure, 0, err);
64+ error (exit_failure, 0, "%s", err);
65 }
66 }
67
68@@ -161,7 +161,7 @@ Gcompile (const char *pattern, size_t pattern_size,
69
70 if ((err = re_compile_pattern (motif, len,
71 &(cregex->patterns[cregex->pcount].regexbuf))) != NULL)
72- error (exit_failure, 0, err);
73+ error (exit_failure, 0, "%s", err);
74 cregex->pcount++;
75
76 motif = sep;
77@@ -247,7 +247,7 @@ compile (const char *pattern, size_t pattern_size,
78
79 if ((err = re_compile_pattern (motif, len,
80 &(cregex->patterns[cregex->pcount].regexbuf))) != NULL)
81- error (exit_failure, 0, err);
82+ error (exit_failure, 0, "%s", err);
83 cregex->pcount++;
84
85 motif = sep;
86--
872.7.4
88
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 \
19 file://fix_aclocal_version.patch \ 19 file://fix_aclocal_version.patch \
20 file://fix_gnu_source_circular.patch \ 20 file://fix_gnu_source_circular.patch \
21 file://hardcode_macro_version.patch \ 21 file://hardcode_macro_version.patch \
22 file://0001-gettext-libgrep-fix-compile-error-Werror-format-secu.patch \
22 " 23 "
23 24
24SRC_URI[md5sum] = "3d9ad24301c6d6b17ec30704a13fe127" 25SRC_URI[md5sum] = "3d9ad24301c6d6b17ec30704a13fe127"