From bad9a3718e84549de23b56eed980f97a0b9c8b7e Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 7 Jul 2010 01:00:58 -0400 Subject: [PATCH] Clear the buffer initially --- gio/tests/converter-stream.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gio/tests/converter-stream.c b/gio/tests/converter-stream.c index 3492db8..63f9e70 100644 --- a/gio/tests/converter-stream.c +++ b/gio/tests/converter-stream.c @@ -653,7 +653,7 @@ test_charset (gconstpointer data) in2 = g_converter_input_stream_new (in, conv); count = 2 * strlen (test->text_out); - buffer = g_malloc (count); + buffer = g_malloc0 (count); error = NULL; g_input_stream_read_all (in2, buffer, count, &bytes_read, NULL, &error); if (test->n_fallbacks == 0) @@ -681,7 +681,7 @@ test_charset (gconstpointer data) in2 = g_converter_input_stream_new (in, conv); count = 2 * strlen (test->text_out); - buffer = g_malloc (count); + buffer = g_malloc0 (count); error = NULL; g_input_stream_read_all (in2, buffer, count, &bytes_read, NULL, &error); g_assert_no_error (error); -- 2.7.4