Commit 09e5144
committed
Fix memory leak in openssl_x509_parse()
If called with a `NULL` buffer argument, `X509_NAME_oneline`
returns a pointer to an owned buffer that the caller is responsible for
freeing. OpenSSL 3.x documents this expectation[1] and existing 1.1.1
usage concurs.[2]
[1] https://docs.openssl.org/master/man3/X509_NAME_print_ex/
[2] https://github.com/openssl/openssl/blob/e04bd3433fd84e1861bf258ea37928d9845e6a86/crypto/x509/x_name.c#L4981 parent 52ada4d commit 09e5144
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2772 | 2772 | | |
2773 | 2773 | | |
2774 | 2774 | | |
2775 | | - | |
| 2775 | + | |
| 2776 | + | |
| 2777 | + | |
| 2778 | + | |
| 2779 | + | |
2776 | 2780 | | |
2777 | 2781 | | |
2778 | 2782 | | |
| |||
0 commit comments