Fix vasprintf implementation
This commit is contained in:
parent
09e7b7c3c5
commit
a08264d348
27
0001-Fix-vasprintf-implementation.patch
Normal file
27
0001-Fix-vasprintf-implementation.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
From 5564db86e9c082ef6d0f26cb23c92a0bcdc2b14a Mon Sep 17 00:00:00 2001
|
||||||
|
From: wuyifeng <wuyifeng10@huawei.com>
|
||||||
|
Date: Wed, 31 Jul 2024 15:17:04 +0800
|
||||||
|
Subject: [PATCH] Fix vasprintf implementation
|
||||||
|
|
||||||
|
A va_copy call must be followed by a va_end call.
|
||||||
|
---
|
||||||
|
src/common.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/common.c b/src/common.c
|
||||||
|
index 6a2e396..c33cbea 100644
|
||||||
|
--- a/src/common.c
|
||||||
|
+++ b/src/common.c
|
||||||
|
@@ -123,8 +123,8 @@ static int vasprintf(char **strp, const char *fmt, va_list va)
|
||||||
|
va_list vacopy;
|
||||||
|
|
||||||
|
va_copy(vacopy, va);
|
||||||
|
-
|
||||||
|
length = vsnprintf(NULL, 0, fmt, vacopy);
|
||||||
|
+ va_end(vacopy);
|
||||||
|
if (length < 0)
|
||||||
|
return length;
|
||||||
|
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -1,11 +1,13 @@
|
|||||||
Name: dosfstools
|
Name: dosfstools
|
||||||
Version: 4.2
|
Version: 4.2
|
||||||
Release: 2
|
Release: 3
|
||||||
Summary: FAT file system userspace tools
|
Summary: FAT file system userspace tools
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
URL: http://www.github.com/dosfstools/dosfstools
|
URL: http://www.github.com/dosfstools/dosfstools
|
||||||
Source0: http://www.github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
Source0: http://www.github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
|
Patch1: 0001-Fix-vasprintf-implementation.patch
|
||||||
|
|
||||||
BuildRequires: gcc autoconf automake
|
BuildRequires: gcc autoconf automake
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -44,6 +46,9 @@ make check
|
|||||||
%{_mandir}/man8/*
|
%{_mandir}/man8/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jul 31 2024 wuyifeng <wuyifeng10@huawei.com> - 4.2-3
|
||||||
|
- Fix vasprintf implementation
|
||||||
|
|
||||||
* Fri Nov 4 2022 zhanchengbin <zhanchengbin1@huawei.com> - 4.2-2
|
* Fri Nov 4 2022 zhanchengbin <zhanchengbin1@huawei.com> - 4.2-2
|
||||||
- Synchronize Version
|
- Synchronize Version
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user