[git] GPG-ERROR - branch, master, updated. libgpg-error-1.20-11-g68827cb

by Justus Winter cvs at cvs.gnupg.org
Thu Dec 3 13:55:40 CET 2015


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 "Error codes used by GnuPG et al.".

The branch, master has been updated
       via  68827cbba2083db40df92de1bc449a3d2d0e81ed (commit)
      from  ee0568476506e54349a38d4bb34bba5635097279 (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 68827cbba2083db40df92de1bc449a3d2d0e81ed
Author: Justus Winter <justus at g10code.com>
Date:   Thu Dec 3 13:50:44 2015 +0100

    tests: Fix read past buffer.
    
    * tests/t-poll.c (test_poll): Fix read past buffer.
    --
    Found using gcc and AddressSanitizer.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/tests/t-poll.c b/tests/t-poll.c
index 5955d50..57cdb75 100644
--- a/tests/t-poll.c
+++ b/tests/t-poll.c
@@ -288,7 +288,9 @@ test_poll (void)
               if (!ret)
                 {
                   assert (nwritten <= used);
-                  memmove (buffer, buffer + nwritten, nwritten);
+                  /* Move the remaining data to the front of buffer.  */
+                  memmove (buffer, buffer + nwritten,
+                           sizeof buffer - nwritten);
                   used -= nwritten;
                 }
               ret = es_fflush (fds[1].stream);

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

Summary of changes:
 tests/t-poll.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
Error codes used by GnuPG et al.
http://git.gnupg.org




More information about the Gnupg-commits mailing list