aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Shih <robertshih@google.com>2016-03-11 18:33:51 -0800
committerThe Android Automerger <android-build@google.com>2016-03-25 17:07:26 -0700
commit3aaad9bda98d58dec596b663f248917da3f1cd02 (patch)
tree4d19e82b71fa7441de5b2a32393c2684e7b75382
parent30c74366eb5e6324563d9ee4e2bd4947708e432d (diff)
downloadflac-lollipop-mr1-release.tar.gz
Bug: 27211885 Change-Id: Ib9c93bd9ffdde2a5f8d31a86f06e267dc9c152db
-rw-r--r--libFLAC/stream_decoder.c1
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++) {