diff options
author | Mingli Yu <mingli.yu@windriver.com> | 2018-07-30 18:40:28 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2018-08-02 02:12:15 -0700 |
commit | d111290acad558e93f9af7fdce7f18c17a0e8e3a (patch) | |
tree | 117f48b59b9e33fba17892a7935220bebbbc7d55 /meta-oe | |
parent | 1993b1f78cc317ce53c3ff46ef14a8744d701537 (diff) | |
download | meta-openembedded-d111290acad558e93f9af7fdce7f18c17a0e8e3a.tar.gz |
librelp: Upgrade to 1.2.16
* Add 0001-src-tcp.c-fix-jump-misses-init-error.patch
to fix -Werror=jump-misses-init error
* Add 0001-src-tcp.c-increase-the-size-of-szHname.patch
to fix -Werror=format-truncation error when
security_flags turned on
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r-- | meta-oe/recipes-extended/rsyslog/librelp/0001-src-tcp.c-fix-jump-misses-init-error.patch | 71 | ||||
-rw-r--r-- | meta-oe/recipes-extended/rsyslog/librelp/0001-src-tcp.c-increase-the-size-of-szHname.patch | 53 | ||||
-rw-r--r-- | meta-oe/recipes-extended/rsyslog/librelp_1.2.16.bb (renamed from meta-oe/recipes-extended/rsyslog/librelp_1.2.14.bb) | 7 |
3 files changed, 129 insertions, 2 deletions
diff --git a/meta-oe/recipes-extended/rsyslog/librelp/0001-src-tcp.c-fix-jump-misses-init-error.patch b/meta-oe/recipes-extended/rsyslog/librelp/0001-src-tcp.c-fix-jump-misses-init-error.patch new file mode 100644 index 000000000..68b686346 --- /dev/null +++ b/meta-oe/recipes-extended/rsyslog/librelp/0001-src-tcp.c-fix-jump-misses-init-error.patch | |||
@@ -0,0 +1,71 @@ | |||
1 | From 3e5a0cb440c788e2383e40ab23ac1cf01d96961b Mon Sep 17 00:00:00 2001 | ||
2 | From: Mingli Yu <mingli.yu@windriver.com> | ||
3 | Date: Tue, 24 Jul 2018 01:30:25 -0700 | ||
4 | Subject: [PATCH] src/tcp.c: fix jump-misses-init error | ||
5 | |||
6 | Fix below jump-misses-init error | ||
7 | |||
8 | | In file included from ../../git/src/tcp.c:51: | ||
9 | | ../../git/src/tcp.c: In function 'relpTcpConnect': | ||
10 | | ../../git/src/relp.h:220:3: error: jump skips variable initialization [-Werror=jump-misses-init] | ||
11 | | goto finalize_it; \ | ||
12 | | ^~~~ | ||
13 | | ../../git/src/tcp.c:1951:3: note: in expansion of macro 'ABORT_FINALIZE' | ||
14 | | ABORT_FINALIZE(RELP_RET_IO_ERR); | ||
15 | | ^~~~~~~~~~~~~~ | ||
16 | | ../../git/src/tcp.c:2005:1: note: label 'finalize_it' defined here | ||
17 | | finalize_it: | ||
18 | | ^~~~~~~~~~~ | ||
19 | | ../../git/src/tcp.c:1991:6: note: 'r' declared here | ||
20 | | int r = getsockopt(pThis->sock, SOL_SOCKET, SO_ERROR, &so_error, &len); | ||
21 | | ^ | ||
22 | | In file included from ../../git/src/tcp.c:51: | ||
23 | | ../../git/src/relp.h:220:3: error: jump skips variable initialization [-Werror=jump-misses-init] | ||
24 | | goto finalize_it; \ | ||
25 | | ^~~~ | ||
26 | | ../../git/src/tcp.c:1951:3: note: in expansion of macro 'ABORT_FINALIZE' | ||
27 | | ABORT_FINALIZE(RELP_RET_IO_ERR); | ||
28 | | ^~~~~~~~~~~~~~ | ||
29 | | ../../git/src/tcp.c:2005:1: note: label 'finalize_it' defined here | ||
30 | | finalize_it: | ||
31 | | ^~~~~~~~~~~ | ||
32 | | ../../git/src/tcp.c:1989:12: note: 'len' declared here | ||
33 | | socklen_t len = sizeof so_error; | ||
34 | | ^~~ | ||
35 | |||
36 | Upstream-Status: Submitted[https://github.com/rsyslog/librelp/pull/117] | ||
37 | |||
38 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> | ||
39 | --- | ||
40 | src/tcp.c | 7 ++++--- | ||
41 | 1 file changed, 4 insertions(+), 3 deletions(-) | ||
42 | |||
43 | diff --git a/src/tcp.c b/src/tcp.c | ||
44 | index f35eb84..fb34dc7 100644 | ||
45 | --- a/src/tcp.c | ||
46 | +++ b/src/tcp.c | ||
47 | @@ -1936,6 +1936,9 @@ relpTcpConnect(relpTcp_t *const pThis, | ||
48 | struct addrinfo hints; | ||
49 | struct addrinfo *reslocal = NULL; | ||
50 | struct pollfd pfd; | ||
51 | + int so_error; | ||
52 | + socklen_t len = sizeof so_error; | ||
53 | + int r; | ||
54 | |||
55 | ENTER_RELPFUNC; | ||
56 | RELPOBJ_assert(pThis, Tcp); | ||
57 | @@ -1985,10 +1988,8 @@ relpTcpConnect(relpTcp_t *const pThis, | ||
58 | ABORT_FINALIZE(RELP_RET_TIMED_OUT); | ||
59 | } | ||
60 | |||
61 | - int so_error; | ||
62 | - socklen_t len = sizeof so_error; | ||
63 | |||
64 | - int r = getsockopt(pThis->sock, SOL_SOCKET, SO_ERROR, &so_error, &len); | ||
65 | + r = getsockopt(pThis->sock, SOL_SOCKET, SO_ERROR, &so_error, &len); | ||
66 | if (r == -1 || so_error != 0) { | ||
67 | pThis->pEngine->dbgprint("socket has an error %d\n", so_error); | ||
68 | ABORT_FINALIZE(RELP_RET_IO_ERR); | ||
69 | -- | ||
70 | 2.17.1 | ||
71 | |||
diff --git a/meta-oe/recipes-extended/rsyslog/librelp/0001-src-tcp.c-increase-the-size-of-szHname.patch b/meta-oe/recipes-extended/rsyslog/librelp/0001-src-tcp.c-increase-the-size-of-szHname.patch new file mode 100644 index 000000000..5a62e1584 --- /dev/null +++ b/meta-oe/recipes-extended/rsyslog/librelp/0001-src-tcp.c-increase-the-size-of-szHname.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | From d8950ad273d79ec516468289adbd427e681dbc66 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mingli Yu <mingli.yu@windriver.com> | ||
3 | Date: Mon, 30 Jul 2018 01:22:56 -0700 | ||
4 | Subject: [PATCH] src/tcp.c: increase the size of szHname | ||
5 | |||
6 | Increase the size of szHname to fix below | ||
7 | error: | ||
8 | | ../../git/src/tcp.c: In function 'relpTcpSetRemHost': | ||
9 | | ../../git/src/tcp.c:352:57: error: '%s' directive output may be truncated writing up to 1024 bytes into a region of size 1011 [-Werror=format-truncation=] | ||
10 | | snprintf((char*)szHname, NI_MAXHOST, "[MALICIOUS:IP=%s]", szIP); | ||
11 | | ^~ ~~~~ | ||
12 | | In file included from /poky-build/tmp/work/i586-poky-linux/librelp/1.2.16-r0/recipe-sysroot/usr/include/stdio.h:862, | ||
13 | | from ../../git/src/tcp.c:38: | ||
14 | | /poky-build/tmp/work/i586-poky-linux/librelp/1.2.16-r0/recipe-sysroot/usr/include/bits/stdio2.h:64:10: note: '__builtin___snprintf_chk' output between 16 and 1040 bytes into a destination of size 1025 | ||
15 | | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, | ||
16 | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
17 | | __bos (__s), __fmt, __va_arg_pack ()); | ||
18 | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
19 | | cc1: all warnings being treated as errors | ||
20 | | Makefile:536: recipe for target 'librelp_la-tcp.lo' failed | ||
21 | |||
22 | Upstream-Status: Submitted[https://github.com/rsyslog/librelp/pull/118] | ||
23 | |||
24 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> | ||
25 | --- | ||
26 | src/tcp.c | 4 ++-- | ||
27 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
28 | |||
29 | diff --git a/src/tcp.c b/src/tcp.c | ||
30 | index fb34dc7..2c38b0b 100644 | ||
31 | --- a/src/tcp.c | ||
32 | +++ b/src/tcp.c | ||
33 | @@ -319,7 +319,7 @@ relpTcpSetRemHost(relpTcp_t *const pThis, struct sockaddr *pAddr) | ||
34 | relpEngine_t *pEngine; | ||
35 | int error; | ||
36 | unsigned char szIP[NI_MAXHOST] = ""; | ||
37 | - unsigned char szHname[NI_MAXHOST] = ""; | ||
38 | + unsigned char szHname[1045] = ""; | ||
39 | struct addrinfo hints, *res; | ||
40 | size_t len; | ||
41 | |||
42 | @@ -349,7 +349,7 @@ relpTcpSetRemHost(relpTcp_t *const pThis, struct sockaddr *pAddr) | ||
43 | if(getaddrinfo((char*)szHname, NULL, &hints, &res) == 0) { | ||
44 | freeaddrinfo (res); | ||
45 | /* OK, we know we have evil, so let's indicate this to our caller */ | ||
46 | - snprintf((char*)szHname, NI_MAXHOST, "[MALICIOUS:IP=%s]", szIP); | ||
47 | + snprintf((char*)szHname, sizeof(szHname), "[MALICIOUS:IP=%s]", szIP); | ||
48 | pEngine->dbgprint("Malicious PTR record, IP = \"%s\" HOST = \"%s\"", szIP, szHname); | ||
49 | iRet = RELP_RET_MALICIOUS_HNAME; | ||
50 | } | ||
51 | -- | ||
52 | 2.17.1 | ||
53 | |||
diff --git a/meta-oe/recipes-extended/rsyslog/librelp_1.2.14.bb b/meta-oe/recipes-extended/rsyslog/librelp_1.2.16.bb index 28047eb54..17478efe4 100644 --- a/meta-oe/recipes-extended/rsyslog/librelp_1.2.14.bb +++ b/meta-oe/recipes-extended/rsyslog/librelp_1.2.16.bb | |||
@@ -6,9 +6,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1fb9c10ed9fd6826757615455ca893a9" | |||
6 | 6 | ||
7 | DEPENDS = "gmp nettle libidn zlib gnutls" | 7 | DEPENDS = "gmp nettle libidn zlib gnutls" |
8 | 8 | ||
9 | SRC_URI = "git://github.com/rsyslog/librelp.git;protocol=https" | 9 | SRC_URI = "git://github.com/rsyslog/librelp.git;protocol=https \ |
10 | file://0001-src-tcp.c-fix-jump-misses-init-error.patch \ | ||
11 | file://0001-src-tcp.c-increase-the-size-of-szHname.patch \ | ||
12 | " | ||
10 | 13 | ||
11 | SRCREV = "fc512e337bfc7c92770246dbff5f482b879498b9" | 14 | SRCREV = "5e849ff060be0c7dce972e194c54fdacfee0adc2" |
12 | 15 | ||
13 | S = "${WORKDIR}/git" | 16 | S = "${WORKDIR}/git" |
14 | 17 | ||