diff options
Diffstat (limited to 'src/input/input_mms.c')
-rw-r--r-- | src/input/input_mms.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/input/input_mms.c b/src/input/input_mms.c index 158b40448..cd88a0609 100644 --- a/src/input/input_mms.c +++ b/src/input/input_mms.c @@ -122,6 +122,13 @@ static buf_element_t *mms_plugin_read_block (input_plugin_t *this_gen, lprintf ("mms_plugin_read_block: %"PRId64" bytes...\n", todo); + if (todo > buf->max_size) + todo = buf->max_size; + if (todo < 0) { + buf->free_buffer (buf); + return NULL; + } + buf->content = buf->mem; buf->type = BUF_DEMUX_BLOCK; |