summaryrefslogtreecommitdiff
path: root/apps/codecs/libFLAC
diff options
context:
space:
mode:
authorJean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com>2005-02-21 21:05:23 +0000
committerJean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com>2005-02-21 21:05:23 +0000
commit32791cf796ea8a155fe8e02fd437d2f39530ca35 (patch)
tree013ee8800ea7aac3d5842efd1fd6106997e07b83 /apps/codecs/libFLAC
parent98e8b8a088b9ca69116cb9478bbc0843883d9159 (diff)
Oops, wrong file committed
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6027 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libFLAC')
-rw-r--r--apps/codecs/libFLAC/stream_decoder.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/codecs/libFLAC/stream_decoder.c b/apps/codecs/libFLAC/stream_decoder.c
index ea6fa6c16c..16413140ce 100644
--- a/apps/codecs/libFLAC/stream_decoder.c
+++ b/apps/codecs/libFLAC/stream_decoder.c
@@ -1140,6 +1140,10 @@ FLAC__bool read_metadata_seektable_(FLAC__StreamDecoder *decoder, FLAC__bool is_
decoder->private_->seek_table.data.seek_table.num_points = length / FLAC__STREAM_METADATA_SEEKPOINT_LENGTH;
/* use realloc since we may pass through here several times (e.g. after seeking) */
+ if(0 == (decoder->private_->seek_table.data.seek_table.points = (FLAC__StreamMetadata_SeekPoint*)realloc(decoder->private_->seek_table.data.seek_table.points, decoder->private_->seek_table.data.seek_table.num_points * sizeof(FLAC__StreamMetadata_SeekPoint)))) {
+ decoder->protected_->state = FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR;
+ return false;
+ }
for(i = 0; i < decoder->private_->seek_table.data.seek_table.num_points; i++) {
if(!FLAC__bitbuffer_read_raw_uint64(decoder->private_->input, &xx, FLAC__STREAM_METADATA_SEEKPOINT_SAMPLE_NUMBER_LEN, read_callback_, decoder))
return false; /* the read_callback_ sets the state for us */