diff options
author | Robert Shih <robertshih@google.com> | 2016-03-22 21:17:46 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-03-22 21:17:46 +0000 |
commit | 4b075cb788972697b9128aae41446f3b4708951d (patch) | |
tree | 74d7734c4605ee9ecde267b12af1b7bfd24b8815 | |
parent | e685ca5e441867515363f6f9c1be5f609b67e975 (diff) | |
parent | 680f668faee4cee465ea8fe6aab59a20417519e8 (diff) | |
download | android_external_flac-4b075cb788972697b9128aae41446f3b4708951d.tar.gz android_external_flac-4b075cb788972697b9128aae41446f3b4708951d.tar.bz2 android_external_flac-4b075cb788972697b9128aae41446f3b4708951d.zip |
Avoid free-before-initialize vulnerability in heap am: 6995c84 am: ca1a1ff am: b8c0a86 am: 02a513a
am: 680f668
* commit '680f668faee4cee465ea8fe6aab59a20417519e8':
Avoid free-before-initialize vulnerability in heap
-rw-r--r-- | libFLAC/stream_decoder.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libFLAC/stream_decoder.c b/libFLAC/stream_decoder.c index d13b23b..7dff737 100644 --- a/libFLAC/stream_decoder.c +++ b/libFLAC/stream_decoder.c @@ -1739,6 +1739,7 @@ FLAC__bool read_metadata_vorbiscomment_(FLAC__StreamDecoder *decoder, FLAC__Stre if (obj->num_comments > 0) { if (0 == (obj->comments = safe_malloc_mul_2op_p(obj->num_comments, /*times*/sizeof(FLAC__StreamMetadata_VorbisComment_Entry)))) { decoder->protected_->state = FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR; + obj->num_comments = 0; return false; } for (i = 0; i < obj->num_comments; i++) { |