diff --git a/0001-utils-fileUtils-Fix-null-string.patch b/0001-utils-fileUtils-Fix-null-string.patch new file mode 100644 index 0000000000000000000000000000000000000000..7c2bf378c7ddd3c36bd39af74b07137e5b4f2a14 --- /dev/null +++ b/0001-utils-fileUtils-Fix-null-string.patch @@ -0,0 +1,29 @@ +From 52f12fea424e62dc6b14aff69406eebe76bf2984 Mon Sep 17 00:00:00 2001 +From: "Christopher N. Hesse" +Date: Wed, 3 Apr 2019 22:23:06 +0200 +Subject: [PATCH 1/2] utils: fileUtils: Fix null string + +syncAndCloseFile() takes an error message string as second argument, so +do not pass NULL. + +Signed-off-by: Christopher N. Hesse +--- + utils/uds/fileUtils.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/utils/uds/fileUtils.c b/utils/uds/fileUtils.c +index d3f6e70..43f1e10 100644 +--- a/utils/uds/fileUtils.c ++++ b/utils/uds/fileUtils.c +@@ -157,7 +157,7 @@ int syncAndCloseFile(int fd, const char *errorMessage) + /**********************************************************************/ + void trySyncAndCloseFile(int fd) + { +- int result = syncAndCloseFile(fd, NULL); ++ int result = syncAndCloseFile(fd, ""); + if (result != UDS_SUCCESS) { + logDebugWithStringError(result, "error syncing and closing file"); + } +-- +2.21.0 + diff --git a/0002-Ignore-misaligned-pointers.patch b/0002-Ignore-misaligned-pointers.patch new file mode 100644 index 0000000000000000000000000000000000000000..85cc8620837ac465773f8cc13f37018c35910b82 --- /dev/null +++ b/0002-Ignore-misaligned-pointers.patch @@ -0,0 +1,38 @@ +From a85f6e9973697f90d11e9beb1eb16206774e4767 Mon Sep 17 00:00:00 2001 +From: "Christopher N. Hesse" +Date: Wed, 3 Apr 2019 22:24:29 +0200 +Subject: [PATCH 2/2] Ignore misaligned pointers + +Signed-off-by: Christopher N. Hesse +--- + utils/vdo/base/Makefile | 1 + + utils/vdo/user/Makefile | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/utils/vdo/base/Makefile b/utils/vdo/base/Makefile +index 4f2ed82..6d4c4e8 100644 +--- a/utils/vdo/base/Makefile ++++ b/utils/vdo/base/Makefile +@@ -46,6 +46,7 @@ C_WARNS = \ + -Wnested-externs \ + -Wold-style-definition \ + -Wswitch-default \ ++ -Wno-address-of-packed-member \ + + OPT_FLAGS = -O3 -fno-omit-frame-pointer + DEBUG_FLAGS = +diff --git a/utils/vdo/user/Makefile b/utils/vdo/user/Makefile +index b0a60d0..811dd8a 100644 +--- a/utils/vdo/user/Makefile ++++ b/utils/vdo/user/Makefile +@@ -48,6 +48,7 @@ C_WARNS = \ + -Wnested-externs \ + -Wold-style-definition \ + -Wswitch-default \ ++ -Wno-address-of-packed-member \ + + OPT_FLAGS = -O3 -fno-omit-frame-pointer + DEBUG_FLAGS = +-- +2.21.0 + diff --git a/vdo.spec b/vdo.spec index d77d0f5380cf1243475fc444c988c0c47f3636d5..5cdc836d1ea9aba6e5722ebb605d59176faf0f27 100644 --- a/vdo.spec +++ b/vdo.spec @@ -3,11 +3,13 @@ Name: vdo Version: 6.2.0.298 -Release: 12 +Release: 13 Summary: Management tools for Virtual Data Optimizer License: GPLv2 URL: http://github.com/dm-vdo/vdo Source0: https://github.com/dm-vdo/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz +Patch0001: 0001-utils-fileUtils-Fix-null-string.patch +Patch0002: 0002-Ignore-misaligned-pointers.patch BuildRequires: gcc libuuid-devel device-mapper-devel device-mapper-event-devel BuildRequires: valgrind-devel python3 python3-devel zlib-devel systemd @@ -78,5 +80,8 @@ done %{_mandir}/man8/* %changelog +* Fri Jun 5 2020 leiju - 6.2.0.298-13 +- Fix null string and misaligned pointers + * Tue Feb 18 2019 cangyi - 6.2.0.298-12 - Package init