aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/estream.c2
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;