summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Kretz <kretz@kde.org>2007-11-15 15:28:04 +0100
committerMatthias Kretz <kretz@kde.org>2007-11-15 15:28:04 +0100
commit0d62b545fbba787e72596fcc30177a6e8596a892 (patch)
tree9d37b4cb9dbdb5a64f7c7d2a198940ec6ba2d11b
parent443fcac477f3844b4e2dcd867f7e8818b83978a7 (diff)
downloadxine-lib-0d62b545fbba787e72596fcc30177a6e8596a892.tar.gz
xine-lib-0d62b545fbba787e72596fcc30177a6e8596a892.tar.bz2
assert that not more than the buffersize is read
-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;
}