diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-03-29 18:09:02 -0700 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-04-05 19:28:28 +0200 |
commit | 50c14d2535046e4d5bc5a00f4a3d171d9c5a053e (patch) | |
tree | 9c32499c062817fec97a7fc8e7a11a9669ef50d1 | |
parent | 60615588194c0ebcae59c031cc59cda69417cc01 (diff) | |
download | meta-openembedded-50c14d2535046e4d5bc5a00f4a3d171d9c5a053e.tar.gz |
libgxim: Fix build with security flags turned on
Signed-off-by: Khem Raj <raj.khem@gmail.com>
4 files changed, 119 insertions, 1 deletions
diff --git a/meta-oe/recipes-extended/libgxim/libgxim/0001-Use-AM_CPPFLAGS-instead-of-INCLUDES.patch b/meta-oe/recipes-extended/libgxim/libgxim/0001-Use-AM_CPPFLAGS-instead-of-INCLUDES.patch new file mode 100644 index 000000000..41e07f39f --- /dev/null +++ b/meta-oe/recipes-extended/libgxim/libgxim/0001-Use-AM_CPPFLAGS-instead-of-INCLUDES.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | From d2ccba90186e2affbb3d146ada341ea2ae6fab2c Mon Sep 17 00:00:00 2001 | ||
2 | From: Akira TAGOH <akira@tagoh.org> | ||
3 | Date: Mon, 13 May 2013 16:05:32 +0900 | ||
4 | Subject: [PATCH 1/3] Use AM_CPPFLAGS instead of INCLUDES | ||
5 | |||
6 | --- | ||
7 | docs/reference/Makefile.am | 2 +- | ||
8 | libgxim/Makefile.am | 2 +- | ||
9 | tests/Makefile.am | 2 +- | ||
10 | 3 files changed, 3 insertions(+), 3 deletions(-) | ||
11 | |||
12 | diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am | ||
13 | index 24986e1..f785735 100644 | ||
14 | --- a/docs/reference/Makefile.am | ||
15 | +++ b/docs/reference/Makefile.am | ||
16 | @@ -84,7 +84,7 @@ expand_content_files= | ||
17 | # signals and properties. | ||
18 | # e.g. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) | ||
19 | # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) | ||
20 | -INCLUDES= \ | ||
21 | +AM_CPPFLAGS= \ | ||
22 | $(GXIM_CFLAGS) \ | ||
23 | -I$(top_srcdir) \ | ||
24 | $(NULL) | ||
25 | diff --git a/libgxim/Makefile.am b/libgxim/Makefile.am | ||
26 | index 572bdb5..ae1ba32 100644 | ||
27 | --- a/libgxim/Makefile.am | ||
28 | +++ b/libgxim/Makefile.am | ||
29 | @@ -1,7 +1,7 @@ | ||
30 | ## | ||
31 | # Global definitions | ||
32 | NULL = | ||
33 | -INCLUDES = \ | ||
34 | +AM_CPPFLAGS = \ | ||
35 | $(GXIM_CFLAGS) \ | ||
36 | -I$(top_srcdir) \ | ||
37 | $(NULL) | ||
38 | diff --git a/tests/Makefile.am b/tests/Makefile.am | ||
39 | index 2926829..919ccc8 100644 | ||
40 | --- a/tests/Makefile.am | ||
41 | +++ b/tests/Makefile.am | ||
42 | @@ -1,7 +1,7 @@ | ||
43 | ## | ||
44 | # Global definitions | ||
45 | NULL = | ||
46 | -INCLUDES = \ | ||
47 | +AM_CPPFLAGS = \ | ||
48 | -I$(top_srcdir)/libgxim \ | ||
49 | -I$(top_srcdir) \ | ||
50 | $(GXIM_CFLAGS) \ | ||
51 | -- | ||
52 | 2.12.1 | ||
53 | |||
diff --git a/meta-oe/recipes-extended/libgxim/libgxim/0002-Update-autotools-macro.patch b/meta-oe/recipes-extended/libgxim/libgxim/0002-Update-autotools-macro.patch new file mode 100644 index 000000000..808203b6e --- /dev/null +++ b/meta-oe/recipes-extended/libgxim/libgxim/0002-Update-autotools-macro.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From 3215783732b147723e3613cc3c3f83cdcf2ae832 Mon Sep 17 00:00:00 2001 | ||
2 | From: Akira TAGOH <akira@tagoh.org> | ||
3 | Date: Wed, 22 Jan 2014 18:59:32 +0900 | ||
4 | Subject: [PATCH 2/3] Update autotools macro | ||
5 | |||
6 | --- | ||
7 | configure.ac | 6 ++++-- | ||
8 | 1 file changed, 4 insertions(+), 2 deletions(-) | ||
9 | |||
10 | diff --git a/configure.ac b/configure.ac | ||
11 | index d559491..8b846a6 100644 | ||
12 | --- a/configure.ac | ||
13 | +++ b/configure.ac | ||
14 | @@ -11,10 +11,12 @@ dnl V=0 to make. | ||
15 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) | ||
16 | |||
17 | AM_MAINTAINER_MODE | ||
18 | -AM_CONFIG_HEADER([config.h]) | ||
19 | +AC_CONFIG_HEADERS([config.h]) | ||
20 | AC_CONFIG_MACRO_DIR([m4macros]) | ||
21 | |||
22 | -AC_PROG_LIBTOOL | ||
23 | +LT_PREREQ([2.2]) | ||
24 | +LT_INIT([disable-static]) | ||
25 | + | ||
26 | AC_PROG_INTLTOOL | ||
27 | |||
28 | AC_PROG_CC | ||
29 | -- | ||
30 | 2.12.1 | ||
31 | |||
diff --git a/meta-oe/recipes-extended/libgxim/libgxim/0003-Add-format-string-qualifier-to-fix-potential-securit.patch b/meta-oe/recipes-extended/libgxim/libgxim/0003-Add-format-string-qualifier-to-fix-potential-securit.patch new file mode 100644 index 000000000..cb21e1ef4 --- /dev/null +++ b/meta-oe/recipes-extended/libgxim/libgxim/0003-Add-format-string-qualifier-to-fix-potential-securit.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From d05d7fa24ee128f1f33a2e905fc3601955dd27d4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 29 Mar 2017 18:06:02 -0700 | ||
4 | Subject: [PATCH 3/3] Add format string qualifier to fix potential security | ||
5 | risk | ||
6 | |||
7 | Fixes | ||
8 | libgxim/gximprotocol10.c:2076:66: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] | ||
9 | |||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | libgxim/gximprotocol10.c | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/libgxim/gximprotocol10.c b/libgxim/gximprotocol10.c | ||
16 | index 04887a5..65bd4df 100644 | ||
17 | --- a/libgxim/gximprotocol10.c | ||
18 | +++ b/libgxim/gximprotocol10.c | ||
19 | @@ -2073,7 +2073,7 @@ g_xim_protocol10_closure_real_parser_error(GXimProtocol *proto, | ||
20 | msg = g_strdup_printf("Unable to parse the protocol %s properly", | ||
21 | g_xim_protocol_name(major_opcode)); | ||
22 | |||
23 | - g_xim_messages_error(G_XIM_PROTOCOL_GET_IFACE (proto)->message, msg); | ||
24 | + g_xim_messages_error(G_XIM_PROTOCOL_GET_IFACE (proto)->message, "%s", msg); | ||
25 | switch (major_opcode) { | ||
26 | case G_XIM_CONNECT: | ||
27 | case G_XIM_AUTH_REQUIRED: | ||
28 | -- | ||
29 | 2.12.1 | ||
30 | |||
diff --git a/meta-oe/recipes-extended/libgxim/libgxim_0.5.0.bb b/meta-oe/recipes-extended/libgxim/libgxim_0.5.0.bb index 44b75315a..5bf7c6e33 100644 --- a/meta-oe/recipes-extended/libgxim/libgxim_0.5.0.bb +++ b/meta-oe/recipes-extended/libgxim/libgxim_0.5.0.bb | |||
@@ -10,7 +10,11 @@ HOMEPAGE = "http://code.google.com/p/libgxim/" | |||
10 | SECTION = "System Environment/Libraries" | 10 | SECTION = "System Environment/Libraries" |
11 | 11 | ||
12 | SRC_URI = "https://bitbucket.org/tagoh/libgxim/downloads/${BPN}-${PV}.tar.bz2 \ | 12 | SRC_URI = "https://bitbucket.org/tagoh/libgxim/downloads/${BPN}-${PV}.tar.bz2 \ |
13 | file://multi-line-ACLOCAL_AMFLAGS-isnot-supported-by-autoreconf.patch" | 13 | file://multi-line-ACLOCAL_AMFLAGS-isnot-supported-by-autoreconf.patch \ |
14 | file://0001-Use-AM_CPPFLAGS-instead-of-INCLUDES.patch \ | ||
15 | file://0002-Update-autotools-macro.patch \ | ||
16 | file://0003-Add-format-string-qualifier-to-fix-potential-securit.patch \ | ||
17 | " | ||
14 | 18 | ||
15 | SRC_URI[md5sum] = "4bb1fa63d00eb224439d413591c29a6a" | 19 | SRC_URI[md5sum] = "4bb1fa63d00eb224439d413591c29a6a" |
16 | SRC_URI[sha256sum] = "75e20d1744139644f9951b78ea3910b162d3380302315cb4b3d0640f23694c79" | 20 | SRC_URI[sha256sum] = "75e20d1744139644f9951b78ea3910b162d3380302315cb4b3d0640f23694c79" |