From c72d5e80c53c53a9a847b1c3b6ac66a7ad7eb815 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 4 Apr 2012 15:41:50 +0200 Subject: mdev-212 sporadic main.connect failures in 5.3 don't cast implicitly an int to a char, when a boolean value is desired. --- sql/password.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/password.c') diff --git a/sql/password.c b/sql/password.c index c8aa90aa56d..728d6ba700a 100644 --- a/sql/password.c +++ b/sql/password.c @@ -503,7 +503,7 @@ check_scramble(const char *scramble_arg, const char *message, mysql_sha1_reset(&sha1_context); mysql_sha1_input(&sha1_context, buf, SHA1_HASH_SIZE); mysql_sha1_result(&sha1_context, hash_stage2_reassured); - return memcmp(hash_stage2, hash_stage2_reassured, SHA1_HASH_SIZE); + return test(memcmp(hash_stage2, hash_stage2_reassured, SHA1_HASH_SIZE)); } -- cgit v1.2.1