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=d8ab03b03566831cb5dfe8caf4a1e1b77106a342

The branch, master has been updated
       via  d8ab03b03566831cb5dfe8caf4a1e1b77106a342 (commit)
      from  d1b1cba265616c7b48948c7f27d4a15f335fd6ae (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 d8ab03b03566831cb5dfe8caf4a1e1b77106a342
Author: Sergey Poznyakoff <g...@gnu.org.ua>
Date:   Thu Apr 8 14:25:20 2010 +0300

    Bugfix in mu_rfc2047_decode.
    
    * mailbox/rfc2047.c (mu_rfc2047_decode): Use temporary buffer
    for reading from the filter stream, to avoid preliminary breaking
    from the read loop when end of the buffer is reached. Realloc the
    buffer as neccessary.

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

Summary of changes:
 mailbox/rfc2047.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/mailbox/rfc2047.c b/mailbox/rfc2047.c
index 540f80e..77d02e5 100644
--- a/mailbox/rfc2047.c
+++ b/mailbox/rfc2047.c
@@ -117,7 +117,8 @@ mu_rfc2047_decode (const char *tocode, const char *input, 
char **ptostr)
          const char *filter_type = NULL;
          size_t nbytes = 0, size;
          const char *sp = fromstr + 2;
-
+         char tmp[128];
+         
          fromcode = getword (&sp, '?');
          encoding_type = getword (&sp, '?');
          encoded_text = getword (&sp, '?');
@@ -164,11 +165,14 @@ mu_rfc2047_decode (const char *tocode, const char *input, 
char **ptostr)
          if (status != 0)
            break;
 
-         while (mu_stream_sequential_read (filter, buffer + bufpos,
-                                        bufsize - bufpos,
-                                        &nbytes) == 0
+         while (mu_stream_sequential_read (filter, tmp, sizeof (tmp),
+                                           &nbytes) == 0
                 && nbytes)
-           bufpos += nbytes;
+           {
+             CHKBUF (nbytes);
+             memcpy (buffer + bufpos, tmp, nbytes);
+             bufpos += nbytes;
+           }
 
          mu_stream_close (filter);
          mu_stream_destroy (&filter, mu_stream_get_owner (filter));


hooks/post-receive
-- 
GNU Mailutils


_______________________________________________
Commit-mailutils mailing list
Commit-mailutils@gnu.org
http://lists.gnu.org/mailman/listinfo/commit-mailutils

Reply via email to