diff --git a/recipes-openharmony/sdk/oniro-openharmony-toolchain-integration-3.1.inc b/recipes-openharmony/sdk/oniro-openharmony-toolchain-integration-3.1.inc index de5b33a122d64abb3549d7f3a9569c99872f7d9a..8e0f8c42baed767a1482282675f21fd1c0bbd6aa 100644 --- a/recipes-openharmony/sdk/oniro-openharmony-toolchain-integration-3.1.inc +++ b/recipes-openharmony/sdk/oniro-openharmony-toolchain-integration-3.1.inc @@ -15,5 +15,4 @@ SRC_URI += "file://patches/foundation_graphic_standard.patch;apply=no;subdir=src SRC_URI += "file://patches/productdefine_common.patch;apply=no;subdir=src" SRC_URI += "file://patches/third_party_libevdev.patch;apply=no;subdir=src" SRC_URI += "file://patches/third_party_libusb.patch;apply=no;subdir=src" -SRC_URI += "file://patches/third_party_e2fsprogs-backports-to-3.1.patch;apply=no;subdir=src" SRC_URI += "file://patches/third_party_selinux.patch;apply=no;subdir=src" diff --git a/recipes-openharmony/sdk/openharmony-3.1/patches/third_party_e2fsprogs-backports-to-3.1.patch b/recipes-openharmony/sdk/openharmony-3.1/patches/third_party_e2fsprogs-backports-to-3.1.patch deleted file mode 100644 index cb41b4e5bd142d05eade448d8672967d9bdfae90..0000000000000000000000000000000000000000 --- a/recipes-openharmony/sdk/openharmony-3.1/patches/third_party_e2fsprogs-backports-to-3.1.patch +++ /dev/null @@ -1,78 +0,0 @@ -# SPDX-FileCopyrightText: Huawei Inc. -# -# SPDX-License-Identifier: Apache-2.0 - -Backport of fixes included in OpenHarmony-v3.1.1 release - -f1f1a3471fdf - Fix CodeCheck warning. -00663d8aab61 - static_cast size_t to int -97aa5de11e0d - Pass parameter p by reference. -6758af0c0da8 - Fix the crash problem caused by overflow in GetDacConfig. - -Signed-off-by: Esben Haabendal <esben.haabendal@huawei.com> -Upstream-Status: Backport - -diff --git a/third_party/e2fsprogs/contrib/android/dac_config.cpp b/third_party/e2fsprogs/contrib/android/dac_config.cpp -index 422e0d52280f..1c76dfd7e7d1 100644 ---- a/third_party/e2fsprogs/contrib/android/dac_config.cpp -+++ b/third_party/e2fsprogs/contrib/android/dac_config.cpp -@@ -35,14 +35,14 @@ struct DacConfig { - string path; - - DacConfig() : uid(0), gid(0), mode(0), capabilities(0), path("") {} -- DacConfig(unsigned int m, unsigned int u, unsigned int g, uint64_t c, string p) : -+ DacConfig(unsigned int m, unsigned int u, unsigned int g, uint64_t c, const string &p) : - uid(u), - gid(g), - mode(m), - capabilities(c), - path(p) {} - -- void SetDefault(unsigned int m, unsigned int u, unsigned int g, uint64_t c, string p) -+ void SetDefault(unsigned int m, unsigned int u, unsigned int g, uint64_t c, const string &p) - { - this->uid = u; - this->gid = g; -@@ -198,33 +198,28 @@ extern "C" { - return 0; - } - -- void GetDacConfig(const char* path, int dir, char* targetOutPath, -+ void GetDacConfig(const char* path, int dir, char*, - unsigned* uid, unsigned* gid, unsigned* mode, - uint64_t* capabilities) - { -- if (path && path[0] == '/') { -- path++; -- } -- -- (void)targetOutPath; -- string str = path; -- string str2; -+ string str = (path != nullptr && *path == '/') ? path + 1 : path; - DacConfig dacConfig(00755, 0, 0, 0, ""); - - if (dir == 0) { - dacConfig.SetDefault(00644, 0, 0, 0, ""); - } - -- if (g_configMap.count(str)) { -- dacConfig = g_configMap[str]; -+ auto it = g_configMap.find(str); -+ if (it != g_configMap.end()) { -+ dacConfig = it->second; - } else if (dir == 0 && !str.empty()) { -- for (auto i = str.size() - 1; i >= 0; i--) { -+ for (int i = static_cast<int>(str.size()) - 1; i >= 0; i--) { - if (str[i] == '/') { - break; - } else { -- str2 = str.substr(0, i) + "*"; -- if (g_configMap.count(str2)) { -- dacConfig = g_configMap[str2]; -+ it = g_configMap.find(str.substr(0, i) + "*"); -+ if (it != g_configMap.end()) { -+ dacConfig = it->second; - break; - } - }