summaryrefslogtreecommitdiff
path: root/third_party/heimdal/lib/krb5/sp800-108-kdf.c
diff options
context:
space:
mode:
authorJoseph Sutton <josephsutton@catalyst.net.nz>2022-03-01 14:17:54 +1300
committerJoseph Sutton <jsutton@samba.org>2022-03-01 22:34:34 +0000
commit51569b3152a952d07fddaa3a70d60c920618c704 (patch)
tree4e447f5d9eb04c7acadf3cff4547068fc79d2113 /third_party/heimdal/lib/krb5/sp800-108-kdf.c
parentfccf9859786dfb50b317ea2296c2494997f0ae09 (diff)
downloadsamba-51569b3152a952d07fddaa3a70d60c920618c704.tar.gz
third_party/heimdal: import lorikeet-heimdal-202203010107 (commit 0e7a12404c388e831fe6933fcc3c86e7eb334825)
NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN! BUG: https://bugzilla.samba.org/show_bug.cgi?id=14995 Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'third_party/heimdal/lib/krb5/sp800-108-kdf.c')
-rwxr-xr-xthird_party/heimdal/lib/krb5/sp800-108-kdf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/third_party/heimdal/lib/krb5/sp800-108-kdf.c b/third_party/heimdal/lib/krb5/sp800-108-kdf.c
index 37e06dec3e8..4a12067c68b 100755
--- a/third_party/heimdal/lib/krb5/sp800-108-kdf.c
+++ b/third_party/heimdal/lib/krb5/sp800-108-kdf.c
@@ -73,7 +73,10 @@ _krb5_SP800_108_HMAC_KDF(krb5_context context,
unsigned char tmp[4];
size_t len;
- HMAC_Init_ex(&c, kdf_K1->data, kdf_K1->length, md, NULL);
+ if (HMAC_Init_ex(&c, kdf_K1->data, kdf_K1->length, md, NULL) == 0) {
+ HMAC_CTX_cleanup(&c);
+ return krb5_enomem(context);
+ }
_krb5_put_int(tmp, i + 1, 4);
HMAC_Update(&c, tmp, 4);