mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-08 06:48:28 +00:00
Fix SIGSEGV when reuse va_list (seen on amd64)
Bump PORTREVISION PR: 87260 Submitted by: Vasil Dimov <vd@datamax.bg>
This commit is contained in:
parent
aaf6aecdf2
commit
d9fabbad13
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=144960
@ -7,6 +7,7 @@
|
||||
|
||||
PORTNAME= str
|
||||
PORTVERSION= 0.9.11
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= ${MASTER_SITE_OSSP}
|
||||
MASTER_SITE_SUBDIR= lib/${PORTNAME}
|
||||
|
21
devel/str/files/patch-str_parse.c
Normal file
21
devel/str/files/patch-str_parse.c
Normal file
@ -0,0 +1,21 @@
|
||||
--- str_parse.c.orig Mon Jan 24 13:20:22 2005
|
||||
+++ str_parse.c Tue Oct 11 13:44:59 2005
|
||||
@@ -297,6 +297,7 @@
|
||||
char buf2[128];
|
||||
char *buf_ptr;
|
||||
str_vformat_t sf;
|
||||
+ va_list ap_temp;
|
||||
|
||||
/*
|
||||
* Caching support
|
||||
@@ -564,7 +565,9 @@
|
||||
sf.data[3].p = (char *)string;
|
||||
sf.data[4].p = cap_vec;
|
||||
sf.data[5].i = cap_num;
|
||||
- l = str_vformat(&sf, buf_ptr, ap);
|
||||
+ /* we shall need `ap' untouched later */
|
||||
+ va_copy(ap_temp, ap);
|
||||
+ l = str_vformat(&sf, buf_ptr, ap_temp);
|
||||
|
||||
/* allocate output buffer */
|
||||
if ((*cpp = (char *)malloc(l+1)) == NULL) {
|
Loading…
Reference in New Issue
Block a user