diff options
-rw-r--r-- | meta/recipes-core/systemd/systemd/0001-resolved-Fix-incorrect-use-of-OpenSSL-BUF_MEM.patch | 41 | ||||
-rw-r--r-- | meta/recipes-core/systemd/systemd_242.bb | 1 |
2 files changed, 42 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/0001-resolved-Fix-incorrect-use-of-OpenSSL-BUF_MEM.patch b/meta/recipes-core/systemd/systemd/0001-resolved-Fix-incorrect-use-of-OpenSSL-BUF_MEM.patch new file mode 100644 index 0000000000..f0ae1db60d --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-resolved-Fix-incorrect-use-of-OpenSSL-BUF_MEM.patch @@ -0,0 +1,41 @@ +From 18bddeaaf225d5becfc10cd2c6a1d037c90574a2 Mon Sep 17 00:00:00 2001 +From: Tomas Mraz <tmraz@fedoraproject.org> +Date: Tue, 11 Jun 2019 15:10:21 +0200 +Subject: [PATCH] resolved: Fix incorrect use of OpenSSL BUF_MEM + +Fixes: #12763 +Upstream-Status: Backport [Not yet released] + https://github.com/systemd/systemd/commit/18bddeaaf225d5becfc10cd2c6a1d037c90574a2 +Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> +--- + src/resolve/resolved-dnstls-openssl.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/resolve/resolved-dnstls-openssl.c b/src/resolve/resolved-dnstls-openssl.c +index f269e4d6487f..5d9223007581 100644 +--- a/src/resolve/resolved-dnstls-openssl.c ++++ b/src/resolve/resolved-dnstls-openssl.c +@@ -6,6 +6,7 @@ + + #include <openssl/bio.h> + #include <openssl/err.h> ++#include <string.h> + + #include "io-util.h" + #include "resolved-dns-stream.h" +@@ -34,9 +35,11 @@ static int dnstls_flush_write_buffer(DnsStream *stream) { + return ss; + } else { + stream->dnstls_data.write_buffer->length -= ss; +- stream->dnstls_data.write_buffer->data += ss; + + if (stream->dnstls_data.write_buffer->length > 0) { ++ memmove(stream->dnstls_data.write_buffer->data, ++ stream->dnstls_data.write_buffer->data + ss, ++ stream->dnstls_data.write_buffer->length); + stream->dnstls_events |= EPOLLOUT; + return -EAGAIN; + } +-- +2.17.1 + diff --git a/meta/recipes-core/systemd/systemd_242.bb b/meta/recipes-core/systemd/systemd_242.bb index 90f235be3d..29f64b995a 100644 --- a/meta/recipes-core/systemd/systemd_242.bb +++ b/meta/recipes-core/systemd/systemd_242.bb @@ -24,6 +24,7 @@ SRC_URI += "file://touchscreen.rules \ file://0005-rules-watch-metadata-changes-in-ide-devices.patch \ file://0006-network-remove-redunant-link-name-in-message.patch \ file://99-default.preset \ + file://0001-resolved-Fix-incorrect-use-of-OpenSSL-BUF_MEM.patch \ " # patches needed by musl |