X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/1df63930a063aa03a7bd09bb719803ea4820d4e1..037aeaf61ace944c3e763346f2f2b877624e6e67:/sbr/netsec.c diff --git a/sbr/netsec.c b/sbr/netsec.c index 01c25f5f..83d75631 100644 --- a/sbr/netsec.c +++ b/sbr/netsec.c @@ -6,10 +6,13 @@ * complete copyright information. */ -#include -#include -#include -#include +#include "h/mh.h" +#include "credentials.h" +#include "getcpy.h" +#include "brkstring.h" +#include "h/utils.h" +#include "h/netsec.h" +#include "h/oauth.h" #include #include #include "base64.h" @@ -807,6 +810,7 @@ netsec_vprintf(netsec_context *nsc, char **errstr, const char *format, va_list ap) { int rc; + va_list apcopy; /* * Cheat a little. If we can fit the data into our outgoing buffer, @@ -814,8 +818,10 @@ netsec_vprintf(netsec_context *nsc, char **errstr, const char *format, */ retry: + va_copy(apcopy, ap); rc = vsnprintf((char *) nsc->ns_outptr, - nsc->ns_outbufsize - nsc->ns_outbuflen, format, ap); + nsc->ns_outbufsize - nsc->ns_outbuflen, format, apcopy); + va_end(apcopy); if (rc >= (int) (nsc->ns_outbufsize - nsc->ns_outbuflen)) { /* @@ -1491,6 +1497,7 @@ netsec_get_sasl_ssf(netsec_context *nsc) #ifdef CYRUS_SASL return nsc->sasl_ssf; #else /* CYRUS_SASL */ + NMH_UNUSED(nsc); return 0; #endif /* CYRUS_SASL */ }