diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2006-07-04 19:06:01 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2006-07-04 19:06:01 +0000 |
commit | 0885baaacb40478dd9eace67a59840deffbe1ce4 (patch) | |
tree | 34551a4eb5d238f1467ac3be2e48f0a7864b8b95 | |
parent | 547c787f636c131945593bc4fd8ef9735ebc865b (diff) |
allocate gsalt large enough; from Matthew R. Dempsky <mrd at alkemio
dot org>; ok djm@ deraadt@
-rw-r--r-- | lib/libc/crypt/bcrypt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/crypt/bcrypt.c b/lib/libc/crypt/bcrypt.c index cdc2dd05a6a..3a09112b40c 100644 --- a/lib/libc/crypt/bcrypt.c +++ b/lib/libc/crypt/bcrypt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bcrypt.c,v 1.20 2006/04/03 19:55:49 deraadt Exp $ */ +/* $OpenBSD: bcrypt.c,v 1.21 2006/07/04 19:06:00 otto Exp $ */ /* * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> @@ -73,7 +73,7 @@ static void encode_base64(u_int8_t *, u_int8_t *, u_int16_t); static void decode_base64(u_int8_t *, u_int16_t, u_int8_t *); static char encrypted[_PASSWORD_LEN]; -static char gsalt[BCRYPT_MAXSALT * 4 / 3 + 1]; +static char gsalt[7 + (BCRYPT_MAXSALT * 4 + 2) / 3 + 1]; static char error[] = ":"; const static u_int8_t Base64Code[] = |