From 467ccbb6062439eda9dce7cd991934d1a5491713 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 27 Jun 2016 10:57:26 +0200 Subject: 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 --- 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; -- cgit v1.2.3