diff options
author | monty@mishka.local <> | 2004-12-22 13:54:39 +0200 |
---|---|---|
committer | monty@mishka.local <> | 2004-12-22 13:54:39 +0200 |
commit | 4f4bbfc279800923299df1fefeb2fcd299fcde90 (patch) | |
tree | 8e5f08b17957f896c2d4e931e60b57d99c260ed6 /sql/password.c | |
parent | 198dc7a8ec6e220c348bb47e59a2ac7532be18b8 (diff) | |
parent | 98f2a83539735f1a69680195290adcf02861f073 (diff) | |
download | mariadb-git-4f4bbfc279800923299df1fefeb2fcd299fcde90.tar.gz |
Merge with 4.1
Diffstat (limited to 'sql/password.c')
-rw-r--r-- | sql/password.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/password.c b/sql/password.c index e2f7e14d39f..79675ade30b 100644 --- a/sql/password.c +++ b/sql/password.c @@ -211,12 +211,13 @@ check_scramble_323(const char *scrambled, const char *message, ulong hash_message[2]; char buff[16],*to,extra; /* Big enough for check */ const char *pos; - + hash_password(hash_message, message, SCRAMBLE_LENGTH_323); randominit(&rand_st,hash_pass[0] ^ hash_message[0], hash_pass[1] ^ hash_message[1]); to=buff; - for (pos=scrambled ; *pos ; pos++) + DBUG_ASSERT(sizeof(buff) > SCRAMBLE_LENGTH_323); + for (pos=scrambled ; *pos && to < buff+sizeof(buff) ; pos++) *to++=(char) (floor(my_rnd(&rand_st)*31)+64); if (pos-scrambled != SCRAMBLE_LENGTH_323) return 1; |