diff options
author | 2006-07-04 19:06:00 +0000 | |
---|---|---|
committer | 2006-07-04 19:06:00 +0000 | |
commit | 8537e1c938757584f2545136a470130a0cea0032 (patch) | |
tree | f056ffb98be7110ed2f7ff5ee2c61f6142853187 /lib/libc/crypt/bcrypt.c | |
parent | Back out the workaround committed in rev 1.13 now that we no longer blindly (diff) | |
download | wireguard-openbsd-8537e1c938757584f2545136a470130a0cea0032.tar.xz wireguard-openbsd-8537e1c938757584f2545136a470130a0cea0032.zip |
allocate gsalt large enough; from Matthew R. Dempsky <mrd at alkemio
dot org>; ok djm@ deraadt@
Diffstat (limited to 'lib/libc/crypt/bcrypt.c')
-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[] = |