aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-02-14 03:21:17 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-02-14 03:21:17 +0000
commitaadfccf7baab9dddc5b773b7d546728a4f200b94 (patch)
tree0a43214f465125675d3576042c737e74b9843256
parent71d8c0f6673705c9064a5e1328599d89ef9ad333 (diff)
parentc193c8db96979860bd9be033ecd0f924e97f4dd9 (diff)
downloadflac-aadfccf7baab9dddc5b773b7d546728a4f200b94.tar.gz
Snap for 6206568 from c193c8db96979860bd9be033ecd0f924e97f4dd9 to rvc-release
Change-Id: I05f0519cdedc9edd1d05afbf5e5e399c5573455f
-rw-r--r--libFLAC/stream_decoder.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libFLAC/stream_decoder.c b/libFLAC/stream_decoder.c
index d364b0ce..071398ae 100644
--- a/libFLAC/stream_decoder.c
+++ b/libFLAC/stream_decoder.c
@@ -1632,6 +1632,8 @@ FLAC__bool read_metadata_streaminfo_(FLAC__StreamDecoder *decoder, FLAC__bool is
/* skip the rest of the block */
FLAC__ASSERT(used_bits % 8 == 0);
+ if (length < (used_bits / 8))
+ return false; /* read_callback_ sets the state for us */
length -= (used_bits / 8);
if(!FLAC__bitreader_skip_byte_block_aligned_no_crc(decoder->private_->input, length))
return false; /* read_callback_ sets the state for us */