-
-
Notifications
You must be signed in to change notification settings - Fork 11k
Closed
prchander/openssl
#3Labels
branch: 1.1.1Applies to OpenSSL_1_1_1-stable branch (EOL)Applies to OpenSSL_1_1_1-stable branch (EOL)branch: masterApplies to master branchApplies to master branchtriaged: bugThe issue/pr is/fixes a bugThe issue/pr is/fixes a bug
Description
In the file p12_key.c, the function PKCS12_key_gen_uni has the following code:
u = EVP_MD_size(md_type);
if (u < 0 || v <= 0)
goto err;
...
for (j = 0; j < v; j++)
B[j] = Ai[j % u];
The variable u is used as a divisor. Since the code explicitly checks whether u is negative, I think it should also avoid the case when u=0 to prevent divide by zero bugs.
Metadata
Metadata
Assignees
Labels
branch: 1.1.1Applies to OpenSSL_1_1_1-stable branch (EOL)Applies to OpenSSL_1_1_1-stable branch (EOL)branch: masterApplies to master branchApplies to master branchtriaged: bugThe issue/pr is/fixes a bugThe issue/pr is/fixes a bug