summaryrefslogtreecommitdiff
path: root/src/test_libOggFLAC
diff options
context:
space:
mode:
authorJosh Coalson <jcoalson@users.sourceforce.net>2004-07-16 00:34:42 +0000
committerJosh Coalson <jcoalson@users.sourceforce.net>2004-07-16 00:34:42 +0000
commitcc75611f633633ea97d47a63d2858d8e1dd9f689 (patch)
treec5f1311fbe9bf9fe52404f46e2e7e5533fa61832 /src/test_libOggFLAC
parent89f161c50fc3d4ae20e31c4f1447a129abe96d2f (diff)
downloadflac-cc75611f633633ea97d47a63d2858d8e1dd9f689.tar.gz
fix valgrind uninitialized memory errors
Diffstat (limited to 'src/test_libOggFLAC')
-rw-r--r--src/test_libOggFLAC/encoders.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test_libOggFLAC/encoders.c b/src/test_libOggFLAC/encoders.c
index 1312f4e1..da33c882 100644
--- a/src/test_libOggFLAC/encoders.c
+++ b/src/test_libOggFLAC/encoders.c
@@ -434,6 +434,7 @@ static FLAC__bool test_stream_encoder()
OggFLAC__SeekableStreamEncoderReadStatus seekable_stream_encoder_read_callback_(const OggFLAC__SeekableStreamEncoder *encoder, FLAC__byte buffer[], unsigned *bytes, void *client_data)
{
(void)encoder, (void)buffer, (void)bytes, (void)client_data;
+ memset(buffer, 0, *bytes); /* init buffer to avoid valgrind errors */
return OggFLAC__SEEKABLE_STREAM_ENCODER_READ_STATUS_CONTINUE;
}