[git] GPG-ERROR - branch, master, updated. libgpg-error-1.22-4-gbaf4bcc

by Werner Koch cvs at cvs.gnupg.org
Wed Jun 15 11:35:34 CEST 2016


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  baf4bcc0973c8b04bd760aaab0f4232c9354e203 (commit)
      from  1ee822f9ff73a9a302ad0eb298640797d735e62b (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 baf4bcc0973c8b04bd760aaab0f4232c9354e203
Author: Werner Koch <wk at gnupg.org>
Date:   Sat May 28 11:27:45 2016 +0200

    Adjust memory limit of es_fopenmem to the block size.
    
    * src/estream.c (func_mem_create): Round up memory limit.
    --
    
    This is required so that giving a memory limit to es_fopenmem won't
    fail if it is below the block size.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/src/estream.c b/src/estream.c
index 499cc75..2033b23 100644
--- a/src/estream.c
+++ b/src/estream.c
@@ -639,6 +639,14 @@ func_mem_create (void *_GPGRT__RESTRICT *_GPGRT__RESTRICT cookie,
       return -1;
     }
 
+  /* Round a memory limit up to the next block length.  */
+  if (memory_limit && block_size)
+    {
+      memory_limit += block_size - 1;
+      memory_limit /= block_size;
+      memory_limit *= block_size;
+    }
+
   mem_cookie = mem_alloc (sizeof (*mem_cookie));
   if (!mem_cookie)
     err = -1;

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

Summary of changes:
 src/estream.c | 8 ++++++++
 1 file changed, 8 insertions(+)


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




More information about the Gnupg-commits mailing list