diff options
Diffstat (limited to 'sys/lib/libsa')
-rw-r--r-- | sys/lib/libsa/pbkdf2.c | 5 | ||||
-rw-r--r-- | sys/lib/libsa/stand.h | 3 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/lib/libsa/pbkdf2.c b/sys/lib/libsa/pbkdf2.c index df0b42897b8..16cacef5633 100644 --- a/sys/lib/libsa/pbkdf2.c +++ b/sys/lib/libsa/pbkdf2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pbkdf2.c,v 1.1 2012/10/09 12:36:50 jsing Exp $ */ +/* $OpenBSD: pbkdf2.c,v 1.2 2015/09/02 01:52:26 yasuoka Exp $ */ /*- * Copyright (c) 2008 Damien Bergamini <damien.bergamini@free.fr> @@ -41,7 +41,7 @@ pkcs5_pbkdf2(const char *pass, size_t pass_len, const char *salt, return -1; if (salt_len == 0 || salt_len > SIZE_MAX - 1) return -1; - if ((asalt = alloca(salt_len + 4)) == NULL) + if ((asalt = alloc(salt_len + 4)) == NULL) return -1; memcpy(asalt, salt, salt_len); @@ -67,6 +67,7 @@ pkcs5_pbkdf2(const char *pass, size_t pass_len, const char *salt, key_len -= r; }; explicit_bzero(asalt, salt_len + 4); + free(asalt, salt_len + 4); explicit_bzero(d1, sizeof(d1)); explicit_bzero(d2, sizeof(d2)); explicit_bzero(obuf, sizeof(obuf)); diff --git a/sys/lib/libsa/stand.h b/sys/lib/libsa/stand.h index 08a84badb0e..a56a2e96b45 100644 --- a/sys/lib/libsa/stand.h +++ b/sys/lib/libsa/stand.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stand.h,v 1.60 2015/02/05 12:56:50 millert Exp $ */ +/* $OpenBSD: stand.h,v 1.61 2015/09/02 01:52:26 yasuoka Exp $ */ /* $NetBSD: stand.h,v 1.18 1996/11/30 04:35:51 gwr Exp $ */ /*- @@ -125,7 +125,6 @@ extern struct open_file files[]; s = ((b) % ((nh) * (ns))) % (ns); void *alloc(u_int); -void *alloca(size_t); void free(void *, u_int); struct disklabel; char *getdisklabel(const char *, struct disklabel *); |