summaryrefslogtreecommitdiffstats
path: root/libFLAC
diff options
context:
space:
mode:
authorRobert Shih <robertshih@google.com>2015-08-21 16:32:59 +0000
committerRobert Shih <robertshih@google.com>2015-08-21 16:36:00 +0000
commitcf87d19d206e108c8354ed31a9e4cba21ee7dac4 (patch)
treefa607172a51170011043a907c3a475da4c60c24a /libFLAC
parent1d948ef7391c9e484658ba024d74433f4df37b3b (diff)
downloadandroid_external_flac-cf87d19d206e108c8354ed31a9e4cba21ee7dac4.tar.gz
android_external_flac-cf87d19d206e108c8354ed31a9e4cba21ee7dac4.tar.bz2
android_external_flac-cf87d19d206e108c8354ed31a9e4cba21ee7dac4.zip
Revert "libFLAC/stream_decoder.c : Fail safely to avoid a heap overflow."
This reverts commit 1d948ef7391c9e484658ba024d74433f4df37b3b. The reverted patch was cherry picked from Xiph commit fcf0ba0. However, the last version update in external/flac, which pulled in changes up to Xiph commit 775eb93, already picked up fcf0ba0. fcf0ba0 applied cleanly for the second time because another Xiph commit b4b2910, which was also picked up in the previous update to external/flac, reverted fcf0ba0. Bug: 23238405 Change-Id: Id3cd66048f78d3bfb5324144bcbfa50740f74d69
Diffstat (limited to 'libFLAC')
-rw-r--r--libFLAC/stream_decoder.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libFLAC/stream_decoder.c b/libFLAC/stream_decoder.c
index 7edf735..d13b23b 100644
--- a/libFLAC/stream_decoder.c
+++ b/libFLAC/stream_decoder.c
@@ -2749,8 +2749,7 @@ 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;
- /* We have received a potentially malicious bit stream. All we can do is error out to avoid a heap overflow. */
- return false;
+ return true;
}
}
else {