Diff of /src/xine-engine/input_cache.c [1db887] .. [6fa58e] Maximize Restore

  Switch to side-by-side view

--- a/src/xine-engine/input_cache.c
+++ b/src/xine-engine/input_cache.c
@@ -34,6 +34,7 @@
 */
 
 #include "xine_internal.h"
+#include <assert.h>
 
 #define DEFAULT_BUFFER_SIZE 1024
 
@@ -190,6 +191,7 @@
     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;
     }