From 9aad41549b5c45758eee69aec663e32725a81fb7 Mon Sep 17 00:00:00 2001 From: "Safey A.Halim" Date: Wed, 15 Jun 2011 06:42:25 +0000 Subject: [PATCH] Fixing Valgrind report --- src/monkey/action_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/monkey/action_api.c b/src/monkey/action_api.c index 0206b87a4..67bd21139 100644 --- a/src/monkey/action_api.c +++ b/src/monkey/action_api.c @@ -564,7 +564,7 @@ static const char* getValgrindOutput(struct GNUNET_MONKEY_ACTION_Context *cntxt) fseek(valgrindFile, 0L, SEEK_SET); valgrindOutput = GNUNET_malloc(size); - fread(valgrindOutput, size, 1, valgrindFile); + fread(valgrindOutput, size - 1, 1, valgrindFile); fclose(valgrindFile); return valgrindOutput; } -- 2.25.1