aboutsummaryrefslogtreecommitdiff
path: root/crypto/rsa/rsa_oaep.c
diff options
context:
space:
mode:
authorGordon Tetlow <gordon@FreeBSD.org>2024-09-04 03:56:17 +0000
committerGordon Tetlow <gordon@FreeBSD.org>2024-09-04 03:56:17 +0000
commit108164cf95d9594884c2dcccba2691335e6f221b (patch)
tree4e7056d88b26a82672d06a7aca8052b58615ca2f /crypto/rsa/rsa_oaep.c
parente60dbfd00b009d424dfc5446d132872c93dd0aed (diff)
Diffstat (limited to 'crypto/rsa/rsa_oaep.c')
-rw-r--r--crypto/rsa/rsa_oaep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/rsa/rsa_oaep.c b/crypto/rsa/rsa_oaep.c
index d9be1a4f98c7..ffe24edcb6ee 100644
--- a/crypto/rsa/rsa_oaep.c
+++ b/crypto/rsa/rsa_oaep.c
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2021 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1999-2024 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@ -186,7 +186,7 @@ int RSA_padding_check_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
mdlen = EVP_MD_get_size(md);
- if (tlen <= 0 || flen <= 0)
+ if (tlen <= 0 || flen <= 0 || mdlen <= 0)
return -1;
/*
* |num| is the length of the modulus; |flen| is the length of the