Introduction
Introduction Statistics Contact Development Disclaimer Help
utils.c: don't reuse a va_list. - susmb - mounting of SMB/CIFS shares via FUSE
git clone git://git.codemadness.org/susmb
Log
Files
Refs
README
LICENSE
---
commit 2195fb4a7d3123d603a27ca7a17804c7d0a8a4f1
parent a189d444526ddcb91d622efc2b1c46d5e3cbcfb2
Author: Geoff Johnstone <[email protected]>
Date: Mon, 4 Feb 2013 19:27:19 +0000
utils.c: don't reuse a va_list.
Diffstat:
M utils.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/utils.c b/utils.c
@@ -187,7 +187,11 @@ bool bvaprintf (char **out, const char *format, va_list ap)
assert (NULL != format);
*out = NULL;
- int bytes = vsnprintf (NULL, 0, format, ap);
+ va_list ap2;
+ va_copy (ap2, ap);
+ int bytes = vsnprintf (NULL, 0, format, ap2);
+ va_end (ap2);
+
if ((1 > bytes) || (INT_MAX == bytes))
return false;
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.