summaryrefslogtreecommitdiff
path: root/sys/lib
diff options
context:
space:
mode:
authorYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2015-09-02 01:52:27 +0000
committerYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2015-09-02 01:52:27 +0000
commit3a5c5695579399f3e89c4670dbdd139540a20752 (patch)
tree94e92b1413e81b36c4393124f483312489316269 /sys/lib
parent98bddd3337aaeb8aeaaf01bdac4e2a4e2610d590 (diff)
Initial commit of uefi boot loader of OpenBSD.
ok deraadt yuo
Diffstat (limited to 'sys/lib')
-rw-r--r--sys/lib/libsa/pbkdf2.c5
-rw-r--r--sys/lib/libsa/stand.h3
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 *);