diff --git a/0029-fix-mixed-use-of-signed-and-unsigned-type.patch b/0029-fix-mixed-use-of-signed-and-unsigned-type.patch new file mode 100644 index 0000000000000000000000000000000000000000..697e039eb426a4e011169a4f2c6ca007160e89fb --- /dev/null +++ b/0029-fix-mixed-use-of-signed-and-unsigned-type.patch @@ -0,0 +1,51 @@ +From 573aae0ba3b76067e76206b78c8243b34e3f40e3 Mon Sep 17 00:00:00 2001 +From: "Neil.wrz" +Date: Tue, 18 Apr 2023 00:05:27 -0700 +Subject: [PATCH] fix mixed use of signed and unsigned type + +Signed-off-by: Neil.wrz +--- + src/lxc/path.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/lxc/path.c b/src/lxc/path.c +index 46256cb..c0529b7 100644 +--- a/src/lxc/path.c ++++ b/src/lxc/path.c +@@ -101,7 +101,7 @@ bool filepath_split(const char *path, char **dir, char **base) + ERROR("Invalid path"); + return false; + } +- i = len - 1; ++ i = (ssize_t)(len - 1); + while (i >= 0 && path[i] != '/') + i--; + +@@ -326,7 +326,7 @@ static int do_get_symlinks(const char **fullpath, const char *prefix, size_t pre + } + + len = strlen(*end); +- if (len >= PATH_MAX - n) { ++ if (len >= (size_t)(PATH_MAX - n)) { + ERROR("Path is too long"); + goto out; + } +@@ -619,7 +619,7 @@ char *path_relative(const char *basepath, const char *targpath) + + if (b0 != bl) { + // Base elements left. Must go up before going down. +- int seps = 0, i; ++ size_t seps = 0, i; + size_t ncopyed = 0, seps_size; + char *buf = NULL; + +@@ -652,4 +652,4 @@ char *path_relative(const char *basepath, const char *targpath) + } + + return safe_strdup(targ + t0); +-} +\ No newline at end of file ++} +-- +2.25.1 + diff --git a/lxc.spec b/lxc.spec index 2c626412b24e826a7db0f2d39223b84ef98f0b05..6d5af864e769bac31c08106aa9413930bb36b6be 100644 --- a/lxc.spec +++ b/lxc.spec @@ -1,4 +1,4 @@ -%global _release 2022102415 +%global _release 2022102416 Name: lxc Version: 4.0.3 @@ -36,6 +36,7 @@ Patch0025: 0025-fix-ops-hierarchies-cause-coredump.patch Patch0026: 0026-meminfo-cri-1.25.patch Patch0027: 0027-add-loongarch64-support-for-lxc.patch Patch0028: 0028-use-ocihooks-env-after-getenv.patch +Patch0029: 0029-fix-mixed-use-of-signed-and-unsigned-type.patch BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath BuildRequires: pkgconfig(libseccomp) @@ -222,6 +223,12 @@ rm -rf %{buildroot}%{_sysconfdir}/default/%{name} %endif %changelog +* Mon Apr 17 2023 wangrunze - 4.0.3-2022102416 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: fix mixed use of signed and unsigned type + * Thu Mar 30 2023 zhangxiaoyu - 4.0.3-2022102415 - Type:bugfix - ID:NA