From ea1403d8d922c3f08dc6feecc17d6eb33b8a72d2 Mon Sep 17 00:00:00 2001 From: Vikas Gorur Date: Thu, 24 Dec 2009 05:30:42 +0000 Subject: storage/posix: Zero out the checksum array in rchecksum. Set the checksum bytes to zero to ensure random junk is not returned as the checksum. Signed-off-by: Vikas Gorur Signed-off-by: Anand V. Avati BUG: 320 (Improve self-heal performance) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=320 --- xlators/storage/posix/src/posix.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index b3217154a..05997c622 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -4685,6 +4685,8 @@ posix_rchecksum (call_frame_t *frame, xlator_t *this, VALIDATE_OR_GOTO (this, out); VALIDATE_OR_GOTO (fd, out); + memset (strong_checksum, 0, MD5_DIGEST_LEN); + buf = CALLOC (1, len); if (!buf) { op_errno = ENOMEM; -- cgit