From 6c11eda6bc6c039a4a300fc6ee298c78b0db20c0 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 1 Jun 2004 23:58:33 +0200 Subject: check_scramble_323 shuold ensure that the scramble has the correct length sql/sql_acl.cc: cleanup --- sql/password.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sql/password.c') diff --git a/sql/password.c b/sql/password.c index 49f149969c9..0ac91346a55 100644 --- a/sql/password.c +++ b/sql/password.c @@ -218,6 +218,8 @@ check_scramble_323(const char *scrambled, const char *message, to=buff; for (pos=scrambled ; *pos ; pos++) *to++=(char) (floor(my_rnd(&rand_st)*31)+64); + if (pos-scrambled != SCRAMBLE_LENGTH_323) + return 1; extra=(char) (floor(my_rnd(&rand_st)*31)); to=buff; while (*scrambled) -- cgit v1.2.1