rollback strprint code modified

Signed-off-by: zhangxiaoyu <zhangxiaoyu58@huawei.com>
(cherry picked from commit a8901d46cf940aedcde48d1b038aa059b3935fcb)
This commit is contained in:
zhangxiaoyu 2022-12-26 11:14:07 +08:00 committed by openeuler-sync-bot
parent 5fce256bef
commit fffd3c2f94
2 changed files with 34 additions and 1 deletions

View File

@ -0,0 +1,26 @@
From aa328d34de2e6c0a8434ac4596344788539a3702 Mon Sep 17 00:00:00 2001
From: zhangxiaoyu <zhangxiaoyu58@huawei.com>
Date: Mon, 26 Dec 2022 11:11:32 +0800
Subject: [PATCH] rollback strprint code modified
Signed-off-by: zhangxiaoyu <zhangxiaoyu58@huawei.com>
---
src/lxc/confile_utils.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lxc/confile_utils.h b/src/lxc/confile_utils.h
index 3655ec4..62990e9 100644
--- a/src/lxc/confile_utils.h
+++ b/src/lxc/confile_utils.h
@@ -13,7 +13,7 @@
if (str) \
len = snprintf(str, inlen, ##__VA_ARGS__); \
else \
- len = 0; \
+ len = snprintf((char *){""}, 0, ##__VA_ARGS__); \
if (len < 0) { \
SYSERROR("failed to create string"); \
return -1; \
--
2.25.1

View File

@ -1,4 +1,4 @@
%global _release 2022102405
%global _release 2022102406
Name: lxc
Version: 4.0.3
@ -61,6 +61,7 @@ Patch0050: 0050-lxc-Add-sw64-architecture.patch
Patch0051: 0051-add-macro-to-adapt-musl-libc.patch
Patch0052: 0052-add-lxc-attach-add-gids-option.patch
Patch0053: 0053-change-the-suffi-parameter-in-lxc-attach-help-output.patch
Patch0054: 0054-rollback-strprint-code-modified.patch
BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath
BuildRequires: pkgconfig(libseccomp)
@ -241,6 +242,12 @@ make check
%endif
%changelog
* Mon Dec 26 2022 zhangxiaoyu<zhangxiaoyu58@huawei.com> - 4.0.3-2022102406
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: rollback strprint code modified
* Fri Dec 16 2022 huangsong<huangsong14@huawei.com> - 4.0.3-2022102405
- Type:bugfix
- ID:NA