FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix memory leaks when BN_bin2bn() fails by ndossche · Pull Request #21062 · php/php-src · GitHub

/ php-src Public
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .c  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
9 changes: 8 additions & 1 deletion ext/openssl/openssl.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -4083,7 +4083,14 @@ static bool php_openssl_pkey_init_legacy_dsa(DSA *dsa, zval *data, bool *is_priv
OPENSSL_PKEY_SET_BN(data, p);
OPENSSL_PKEY_SET_BN(data, q);
OPENSSL_PKEY_SET_BN(data, g);
if (!p || !q || !g || !DSA_set0_pqg(dsa, p, q, g)) {
if (!p || !q || !g) {
BN_free(p);
BN_free(q);
BN_free(g);
return 0;
}

if (!DSA_set0_pqg(dsa, p, q, g)) {
return 0;
}

Expand Down
Loading

Back | FazBrowse Home | New Git URL