summaryrefslogtreecommitdiff
path: root/sql/password.c
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-06-01 23:58:33 +0200
committerunknown <serg@serg.mylan>2004-06-01 23:58:33 +0200
commit869fbff91f848e7433c44994952e67c301f5052b (patch)
tree31b7886d700b43cecff6bb736071b19f7cb3e3b7 /sql/password.c
parentce0d015384d65199c3e0f830aa4f49937285e12b (diff)
downloadmariadb-git-869fbff91f848e7433c44994952e67c301f5052b.tar.gz
check_scramble_323 shuold ensure that the scramble has the correct length
sql/sql_acl.cc: cleanup
Diffstat (limited to 'sql/password.c')
-rw-r--r--sql/password.c2
1 files changed, 2 insertions, 0 deletions
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)