Projects
Mega:24.03:SP1:Everything
lvm2
_service:tar_scm:0010-bugfix-lvm2-fix-the-reuse...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:0010-bugfix-lvm2-fix-the-reuse-of-va_list.patch of Package lvm2
From 70330d222e3231af111e9d7b500ed86e0980a2c6 Mon Sep 17 00:00:00 2001 From: wangjufeng <wangjufeng@huawei.com> Date: Fri, 20 Mar 2020 19:28:02 +0800 Subject: [PATCH] lvm2: fix the reuse of va_list After a va_list is used, it should not be used again. Because it is already changed after using. Signed-off-by: wangjufeng<wangjufeng@huawei.com> --- libdm/libdm-common.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libdm/libdm-common.c b/libdm/libdm-common.c index 2fd8783..7f2fb81 100644 --- a/libdm/libdm-common.c +++ b/libdm/libdm-common.c @@ -113,6 +113,7 @@ static void _default_log_line(int level, const char *file, int line, int dm_errno_or_class, const char *f, va_list ap) { + va_list copyap; static int _abort_on_internal_errors = -1; static int _debug_with_line_numbers = -1; FILE *out = log_stderr(level) ? stderr : stdout; @@ -131,8 +132,10 @@ static void _default_log_line(int level, const char *file, if (_debug_with_line_numbers) fprintf(out, "%s:%d ", file, line); + va_copy(copyap, ap); vfprintf(out, f, ap); - vsyslog(level, f, ap); + vsyslog(level, f, copyap); + va_end(copyap); fputc('\n', out); } -- 1.8.3.1
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2