diff options
author | Erik de Castro Lopo <erikd@mega-nerd.com> | 2015-08-20 17:34:10 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-08-20 17:34:10 +0000 |
commit | 1e5f0b6c187bb91dcbcb2da0479928d1577222f7 (patch) | |
tree | 2aa37fbce870ebf7141e537a2652c9f7a32ff1dc | |
parent | 39b2a5bb953dc7465ff44b897a637ce3d52836d1 (diff) | |
parent | 1d948ef7391c9e484658ba024d74433f4df37b3b (diff) | |
download | android_external_flac-1e5f0b6c187bb91dcbcb2da0479928d1577222f7.tar.gz android_external_flac-1e5f0b6c187bb91dcbcb2da0479928d1577222f7.tar.bz2 android_external_flac-1e5f0b6c187bb91dcbcb2da0479928d1577222f7.zip |
am 1d948ef7: libFLAC/stream_decoder.c : Fail safely to avoid a heap overflow.
* commit '1d948ef7391c9e484658ba024d74433f4df37b3b':
libFLAC/stream_decoder.c : Fail safely to avoid a heap overflow.
-rw-r--r-- | libFLAC/stream_decoder.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libFLAC/stream_decoder.c b/libFLAC/stream_decoder.c index d13b23b..7edf735 100644 --- a/libFLAC/stream_decoder.c +++ b/libFLAC/stream_decoder.c @@ -2749,7 +2749,8 @@ FLAC__bool read_residual_partitioned_rice_(FLAC__StreamDecoder *decoder, unsigne if(decoder->private_->frame.header.blocksize < predictor_order) { send_error_to_client_(decoder, FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC); decoder->protected_->state = FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC; - return true; + /* We have received a potentially malicious bit stream. All we can do is error out to avoid a heap overflow. */ + return false; } } else { |