diff --git a/src/server/person.c b/src/server/person.c index 42ccae88793f508084418a211c2f1dd9ca941352..70838d58107664e218be928374903a2414af4c6a 100644 --- a/src/server/person.c +++ b/src/server/person.c @@ -1,5 +1,5 @@ /* - * $Id: person.c,v 0.10 1991/09/15 10:30:33 linus Exp $ + * $Id: person.c,v 0.11 1991/09/25 09:45:33 ceder Exp $ * Copyright (C) 1991 Lysator Academic Computer Association. * * This file is part of the LysKOM server. @@ -28,7 +28,7 @@ * All atomic calls that deals with persons. */ -static char *rcsid = "$Id: person.c,v 0.10 1991/09/15 10:30:33 linus Exp $"; +static char *rcsid = "$Id: person.c,v 0.11 1991/09/25 09:45:33 ceder Exp $"; #include <m-config.h> #include <time.h> @@ -80,8 +80,8 @@ do_set_passwd( Password pwd, if ( !legal_passwd(new_pwd) ) return FAILURE; - salt[0] = crypt_seed [rand() % sizeof (crypt_seed)]; - salt[1] = crypt_seed [rand() % sizeof (crypt_seed)]; + salt[0] = crypt_seed [rand() % (sizeof (crypt_seed) - 1)]; + salt[1] = crypt_seed [rand() % (sizeof (crypt_seed) - 1)]; salt[2] = '\0'; password = s_crea_c_str(new_pwd);