From ebfebfe827a6763932073be95d17a70a23bc49b5 Mon Sep 17 00:00:00 2001 From: Daniel Caujolle-Bert Date: Fri, 9 Jul 2004 13:16:59 +0000 Subject: buffer should be large enought (Thibaut's hunt) CVS patchset: 6782 CVS date: 2004/07/09 13:16:59 --- src/demuxers/demux_flac.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/demuxers/demux_flac.c b/src/demuxers/demux_flac.c index 76fbfbe3d..3ebf7781f 100644 --- a/src/demuxers/demux_flac.c +++ b/src/demuxers/demux_flac.c @@ -23,7 +23,7 @@ * For more information on the FLAC file format, visit: * http://flac.sourceforge.net/ * - * $Id: demux_flac.c,v 1.4 2004/06/15 21:22:34 miguelfreitas Exp $ + * $Id: demux_flac.c,v 1.5 2004/07/09 13:16:59 f1rmb Exp $ */ #ifdef HAVE_CONFIG_H @@ -92,7 +92,7 @@ static int open_flac_file(demux_flac_t *flac) { unsigned char preamble[4]; unsigned int block_length; - unsigned char buffer[16]; + unsigned char buffer[FLAC_SEEKPOINT_SIZE]; unsigned char *streaminfo = flac->streaminfo + sizeof(xine_waveformatex); int i; @@ -167,8 +167,7 @@ static int open_flac_file(demux_flac_t *flac) { flac->seekpoints = xine_xmalloc(flac->seekpoint_count * sizeof(flac_seekpoint_t)); for (i = 0; i < flac->seekpoint_count; i++) { - if (flac->input->read(flac->input, buffer, FLAC_SEEKPOINT_SIZE) != - FLAC_SEEKPOINT_SIZE) + if (flac->input->read(flac->input, buffer, FLAC_SEEKPOINT_SIZE) != FLAC_SEEKPOINT_SIZE) return 0; flac->seekpoints[i].sample_number = BE_64(&buffer[0]); lprintf (" %d: sample %lld, ", i, flac->seekpoints[i].sample_number); -- cgit v1.2.3