Fix null string and misaligned pointers
This commit is contained in:
parent
9e74a7a65e
commit
2f1adb35c6
29
0001-utils-fileUtils-Fix-null-string.patch
Normal file
29
0001-utils-fileUtils-Fix-null-string.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From 52f12fea424e62dc6b14aff69406eebe76bf2984 Mon Sep 17 00:00:00 2001
|
||||
From: "Christopher N. Hesse" <raymanfx@gmail.com>
|
||||
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 <raymanfx@gmail.com>
|
||||
---
|
||||
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
|
||||
|
||||
38
0002-Ignore-misaligned-pointers.patch
Normal file
38
0002-Ignore-misaligned-pointers.patch
Normal file
@ -0,0 +1,38 @@
|
||||
From a85f6e9973697f90d11e9beb1eb16206774e4767 Mon Sep 17 00:00:00 2001
|
||||
From: "Christopher N. Hesse" <raymanfx@gmail.com>
|
||||
Date: Wed, 3 Apr 2019 22:24:29 +0200
|
||||
Subject: [PATCH 2/2] Ignore misaligned pointers
|
||||
|
||||
Signed-off-by: Christopher N. Hesse <raymanfx@gmail.com>
|
||||
---
|
||||
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
|
||||
|
||||
7
vdo.spec
7
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<leiju4@huawei.com> - 6.2.0.298-13
|
||||
- Fix null string and misaligned pointers
|
||||
|
||||
* Tue Feb 18 2019 cangyi<cangyi@huawei.com> - 6.2.0.298-12
|
||||
- Package init
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user