From a5901e392667d0d6cf3763e13d8f1fdbcb81e158 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Mon, 5 May 2003 23:02:17 +0000 Subject: - fix a possible crash when the preview size was greater than the size requested CVS patchset: 4776 CVS date: 2003/05/05 23:02:17 --- src/xine-engine/demux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xine-engine/demux.c b/src/xine-engine/demux.c index c6dcbf280..ed802d8fa 100644 --- a/src/xine-engine/demux.c +++ b/src/xine-engine/demux.c @@ -350,8 +350,8 @@ int xine_demux_read_header( input_plugin_t *input, unsigned char *buffer, off_t return 0; input->seek(input, 0, SEEK_SET); } else if (input->get_capabilities(input) & INPUT_CAP_PREVIEW) { - buf = xine_xmalloc(MAX_PREVIEW_SIZE); - read_size = input->get_optional_data(input, buf, INPUT_OPTIONAL_DATA_PREVIEW); + buf = xine_xmalloc(size); + read_size = input->get_optional_data(input, buf, size); memcpy(buffer, buf, size); free(buf); } else { -- cgit v1.2.3