Wed Mar 31 06:38:40 PDT 2010
- Previous message: [Slony1-commit] slony1-engine/tests/testutf8 generate_dml.sh
- Next message: [Slony1-commit] slony1-engine/src/slon misc.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /home/cvsd/slony1/slony1-engine/src/slon
In directory main.slony.info:/tmp/cvs-serv5990/src/slon
Modified Files:
Tag: REL_1_2_STABLE
misc.c
Log Message:
Perform a va_copy and use the copy in the loop that uses va_args.
You are not allowed to use va_args multiple times.
Fix for bug # 55
Patch submitted by Paul Cannon
Index: misc.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/misc.c,v
retrieving revision 1.22.2.6
retrieving revision 1.22.2.7
diff -C 2 -d -r1.22.2.6 -r1.22.2.7
*** misc.c 11 Feb 2010 21:16:35 -0000 1.22.2.6
--- misc.c 31 Mar 2010 13:38:38 -0000 1.22.2.7
***************
*** 177,181 ****
off = strlen(outbuf);
! while (vsnprintf(&outbuf[off], outsize - off - 1, fmt, ap) >= outsize - off - 1)
{
outsize *= 2;
--- 177,183 ----
off = strlen(outbuf);
! va_list apcopy;
! va_copy(apcopy, ap);
! while (vsnprintf(&outbuf[off], outsize - off - 1, fmt, apcopy) >= outsize - off - 1)
{
outsize *= 2;
***************
*** 186,190 ****
--- 188,197 ----
slon_retry();
}
+ va_end(apcopy);
+ va_copy(apcopy, ap);
}
+
+ va_end(apcopy);
+
#ifdef HAVE_SYSLOG
if (Use_syslog >= 1)
- Previous message: [Slony1-commit] slony1-engine/tests/testutf8 generate_dml.sh
- Next message: [Slony1-commit] slony1-engine/src/slon misc.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list