diff options
author | Robert Shih <robertshih@google.com> | 2016-03-11 18:33:51 -0800 |
---|---|---|
committer | The Android Automerger <android-build@google.com> | 2016-03-25 17:07:26 -0700 |
commit | 3aaad9bda98d58dec596b663f248917da3f1cd02 (patch) | |
tree | 4d19e82b71fa7441de5b2a32393c2684e7b75382 | |
parent | 30c74366eb5e6324563d9ee4e2bd4947708e432d (diff) | |
download | flac-lollipop-mr1-release.tar.gz |
Avoid free-before-initialize vulnerability in heapandroid-cts-5.1_r28android-cts-5.1_r27android-cts-5.1_r26android-cts-5.1_r25android-cts-5.1_r24android-cts-5.1_r23android-cts-5.1_r22android-cts-5.1_r21android-cts-5.1_r20android-cts-5.1_r19android-cts-5.1_r18android-cts-5.1_r17android-cts-5.1_r16android-cts-5.1_r15android-cts-5.1_r14android-cts-5.1_r13android-5.1.1_r38lollipop-mr1-releaselollipop-mr1-cts-release
Bug: 27211885
Change-Id: Ib9c93bd9ffdde2a5f8d31a86f06e267dc9c152db
-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 d13b23b7..7dff737d 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++) { |