mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
Fix double free bug in SSL code
* src/openssl.c, src/gnutls.c (ssl_init): Copy options using xstrdup
This commit is contained in:
parent
566696cb82
commit
8654f7e2e7
@ -184,13 +184,13 @@ ssl_init (void)
|
||||
/* Use the private key from the cert file unless otherwise specified. */
|
||||
if (opt.cert_file && !opt.private_key)
|
||||
{
|
||||
opt.private_key = opt.cert_file;
|
||||
opt.private_key = xstrdup (opt.cert_file);
|
||||
opt.private_key_type = opt.cert_type;
|
||||
}
|
||||
/* Use the cert from the private key file unless otherwise specified. */
|
||||
if (!opt.cert_file && opt.private_key)
|
||||
{
|
||||
opt.cert_file = opt.private_key;
|
||||
opt.cert_file = xstrdup (opt.private_key);
|
||||
opt.cert_type = opt.private_key_type;
|
||||
}
|
||||
|
||||
|
@ -292,7 +292,7 @@ ssl_init (void)
|
||||
/* Use the private key from the cert file unless otherwise specified. */
|
||||
if (opt.cert_file && !opt.private_key)
|
||||
{
|
||||
opt.private_key = opt.cert_file;
|
||||
opt.private_key = xstrdup (opt.cert_file);
|
||||
opt.private_key_type = opt.cert_type;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user