summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xine-engine/input_cache.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/xine-engine/input_cache.c b/src/xine-engine/input_cache.c
index 75c4beb43..fea777a42 100644
--- a/src/xine-engine/input_cache.c
+++ b/src/xine-engine/input_cache.c
@@ -36,6 +36,7 @@
*/
#include "xine_internal.h"
+#include <assert.h>
#define DEFAULT_BUFFER_SIZE 1024
@@ -192,6 +193,7 @@ static buf_element_t *cache_plugin_read_block(input_plugin_t *this_gen, fifo_buf
if (buf) {
buf->type = BUF_DEMUX_BLOCK;
+ assert(todo <= buf->max_size);
read_len = cache_plugin_read (this_gen, buf->content, todo);
buf->size = read_len;
}