src/libFLAC/stream_decoder.c : Fix NULL de-reference. am: 83a817d200 am: 5e39e0d829 am: 10c2965d9b am: 1fa69f344f am: 709f40556d am: 1118807bd4 am: 3424de3df7
am: a5a50068aa

Change-Id: Ia885f0373ee67ada38a5f728d8f69265802b8c70
diff --git a/libFLAC/stream_decoder.c b/libFLAC/stream_decoder.c
index 7dff737..601d86f 100644
--- a/libFLAC/stream_decoder.c
+++ b/libFLAC/stream_decoder.c
@@ -1754,8 +1754,10 @@
 				}
 				else
 					length -= 4;
-				if (!FLAC__bitreader_read_uint32_little_endian(decoder->private_->input, &obj->comments[i].length))
+				if (!FLAC__bitreader_read_uint32_little_endian(decoder->private_->input, &obj->comments[i].length)) {
+					obj->num_comments = i;
 					return false; /* read_callback_ sets the state for us */
+				}
 				if (obj->comments[i].length > 0) {
 					if (length < obj->comments[i].length) {
 						obj->num_comments = i;