From 6686c410f3bd5c6f204d4b8e75d304a7f5c4c3b3 Mon Sep 17 00:00:00 2001 From: smf- Date: Thu, 3 May 2012 15:28:54 +0000 Subject: [PATCH] Fixed "potentially uninitalized local variable" error when building with msvc, The code does appear to assume that variables on the stack are zero'd. --- src/lib/libflac/libflac/stream_decoder.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/libflac/libflac/stream_decoder.c b/src/lib/libflac/libflac/stream_decoder.c index d5040c58121..e2dc94d815a 100644 --- a/src/lib/libflac/libflac/stream_decoder.c +++ b/src/lib/libflac/libflac/stream_decoder.c @@ -1464,6 +1464,7 @@ FLAC__bool read_metadata_(FLAC__StreamDecoder *decoder) block.is_last = is_last; block.type = (FLAC__MetadataType)type; block.length = length; + memset(&block.data, 0, sizeof(block.data)); if(type == FLAC__METADATA_TYPE_APPLICATION) { if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, block.data.application.id, FLAC__STREAM_METADATA_APPLICATION_ID_LEN/8))