diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2020-02-14 03:21:17 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2020-02-14 03:21:17 +0000 |
commit | aadfccf7baab9dddc5b773b7d546728a4f200b94 (patch) | |
tree | 0a43214f465125675d3576042c737e74b9843256 | |
parent | 71d8c0f6673705c9064a5e1328599d89ef9ad333 (diff) | |
parent | c193c8db96979860bd9be033ecd0f924e97f4dd9 (diff) | |
download | flac-aadfccf7baab9dddc5b773b7d546728a4f200b94.tar.gz |
Snap for 6206568 from c193c8db96979860bd9be033ecd0f924e97f4dd9 to rvc-release
Change-Id: I05f0519cdedc9edd1d05afbf5e5e399c5573455f
-rw-r--r-- | libFLAC/stream_decoder.c | 2 |
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 */ |