[Pkg-gnupg-commit] [libgpg-error] 05/15: estream: Fix bug es_fclose_snatch if a seek has been used.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Thu Jul 14 23:49:27 UTC 2016


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch master
in repository libgpg-error.

commit 467ccbb6062439eda9dce7cd991934d1a5491713
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Jun 27 10:57:26 2016 +0200

    estream: Fix bug es_fclose_snatch if a seek has been used.
    
    * src/estream.c (func_mem_ioctl): Set LEN from DATA_LEN.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>
---
 src/estream.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/estream.c b/src/estream.c
index 2a44ac3..4352df5 100644
--- a/src/estream.c
+++ b/src/estream.c
@@ -890,7 +890,7 @@ func_mem_ioctl (void *cookie, int cmd, void *ptr, size_t *len)
       /* Return the internal buffer of the stream to the caller and
          invalidate it for the stream.  */
       *(void**)ptr = mem_cookie->memory;
-      *len = mem_cookie->offset;
+      *len = mem_cookie->data_len;
       mem_cookie->memory = NULL;
       mem_cookie->memory_size = 0;
       mem_cookie->offset = 0;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/libgpg-error.git



More information about the Pkg-gnupg-commit mailing list