diff options
author | Werner Koch <[email protected]> | 2016-06-27 08:57:26 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2016-06-27 08:57:26 +0000 |
commit | 467ccbb6062439eda9dce7cd991934d1a5491713 (patch) | |
tree | fb0b9ed8cd687ca22982fad25bdb204722d8288a | |
parent | w32: Silence compiler warnings about redefined macros. (diff) | |
download | libgpg-error-467ccbb6062439eda9dce7cd991934d1a5491713.tar.gz libgpg-error-467ccbb6062439eda9dce7cd991934d1a5491713.zip |
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 <[email protected]>
-rw-r--r-- | src/estream.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |