diff options
author | Vikas Gorur <vikas@gluster.com> | 2009-12-24 05:30:42 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-12-28 04:39:27 -0800 |
commit | ea1403d8d922c3f08dc6feecc17d6eb33b8a72d2 (patch) | |
tree | cfd127d51b8484c5a4b3fb63c479c16ad8ec3236 /xlators/storage/posix/src | |
parent | 3bcf8d4ce67654e2b5648ae11aaeb2e49dbcfa95 (diff) |
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 <vikas@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 320 (Improve self-heal performance)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=320
Diffstat (limited to 'xlators/storage/posix/src')
-rw-r--r-- | xlators/storage/posix/src/posix.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index b3217154ac0..05997c62210 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; |