[SCM] GNU Mailutils branch, master, updated. release-2.2-373-ga9667ed

"Sergey Poznyakoff" <[email protected]>
Newsgroups gmane.comp.gnu.mailutils.cvs
Message-ID <[email protected]>
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Mailutils".

http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=a9667edc912dc6d51031d09f9f5ded223851318a

The branch, master has been updated
       via  a9667edc912dc6d51031d09f9f5ded223851318a (commit)
      from  5e1d982ec31de34b7bf7ca6b84172966ebf9d917 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a9667edc912dc6d51031d09f9f5ded223851318a
Author: Sergey Poznyakoff <[email protected]>
Date:   Thu Jul 7 11:43:26 2011 +0300

    Bugfix.
    
    * libmailutils/string/vasnprintf.c (mu_vasnprintf): Operate on
    a fresh copy of va_alist in each new iteration.
    * libproto/imap/folder.c: Likewise.
    * libproto/nntp/nntp_sendline.c: Likewise.

-----------------------------------------------------------------------

Summary of changes:
 libmailutils/string/vasnprintf.c |    8 +++++++-
 libproto/imap/folder.c           |    5 ++++-
 libproto/nntp/nntp_sendline.c    |    5 ++++-
 3 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/libmailutils/string/vasnprintf.c b/libmailutils/string/vasnprintf.c
index abc0ef3..c7c762f 100644
--- a/libmailutils/string/vasnprintf.c
+++ b/libmailutils/string/vasnprintf.c
@@ -46,7 +46,13 @@ mu_vasnprintf (char **pbuf, size_t *psize, const char *fmt, va_list ap)
   
   for (;;)
     {
-      ssize_t n = vsnprintf (buf, buflen, fmt, ap);
+      ssize_t n;
+      va_list aq;
+
+      va_copy(aq, ap);
+      n = vsnprintf (buf, buflen, fmt, aq);
+      va_end(aq);
+
       if (n < 0 || n >= buflen || !memchr (buf, '\0', n + 1))
 	{
 	  char *newbuf;
diff --git a/libproto/imap/folder.c b/libproto/imap/folder.c
index f5286ef..828f2a2 100644
--- a/libproto/imap/folder.c
+++ b/libproto/imap/folder.c
@@ -2150,7 +2150,10 @@ imap_writeline (f_imap_t f_imap, const char *format, ...)
   va_start(ap, format);
   do
     {
-      len = vsnprintf (f_imap->buffer, f_imap->buflen, format, ap);
+      va_list aq;
+      va_copy(aq, ap);
+      len = vsnprintf (f_imap->buffer, f_imap->buflen, format, aq);
+      va_end(aq);
       if (len < 0 || len >= (int)f_imap->buflen
           || !memchr (f_imap->buffer, '\0', len + 1))
         {
diff --git a/libproto/nntp/nntp_sendline.c b/libproto/nntp/nntp_sendline.c
index 15061e1..3962caa 100644
--- a/libproto/nntp/nntp_sendline.c
+++ b/libproto/nntp/nntp_sendline.c
@@ -88,7 +88,10 @@ mu_nntp_writeline (mu_nntp_t nntp, const char *format, ...)
      let's try to cope.  */
   do
     {
-      len = vsnprintf (nntp->io.buf, nntp->io.len - 1, format, ap);
+      va_list aq;
+      va_copy(aq, ap);
+      len = vsnprintf (nntp->io.buf, nntp->io.len - 1, format, aq);
+      va_end(aq);
       if (len < 0 || len >= (int)nntp->io.len
 	  || !memchr (nntp->io.buf, '\0', len + 1))
 	{


hooks/post-receive
-- 
GNU Mailutils
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.