1
0
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:
Marcus Alves Grando 2005-10-11 17:02:24 +00:00
parent aaf6aecdf2
commit d9fabbad13
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=144960
2 changed files with 22 additions and 0 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= str
PORTVERSION= 0.9.11
PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_OSSP}
MASTER_SITE_SUBDIR= lib/${PORTNAME}

View 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) {