[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 182/282: smtp: overwriting 'from' leaks memory
From: |
gnunet |
Subject: |
[gnurl] 182/282: smtp: overwriting 'from' leaks memory |
Date: |
Wed, 01 Apr 2020 14:30:47 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit aeb292301acadda60751601c5816d628e6b5e58f
Author: Daniel Stenberg <address@hidden>
AuthorDate: Fri Feb 28 09:49:02 2020 +0100
smtp: overwriting 'from' leaks memory
Detected by Coverity. CID 1418139.
Also, make sure to return error if the new 'from' allocation fails.
Closes #4997
---
lib/smtp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/smtp.c b/lib/smtp.c
index 77fcd5afc..e1872871d 100644
--- a/lib/smtp.c
+++ b/lib/smtp.c
@@ -625,6 +625,7 @@ static CURLcode smtp_perform_mail(struct connectdata *conn)
utf8 = TRUE;
if(host.name) {
+ free(from);
from = aprintf("<%s@%s>", address, host.name);
Curl_free_idnconverted_hostname(&host);
@@ -635,6 +636,8 @@ static CURLcode smtp_perform_mail(struct connectdata *conn)
auth = aprintf("<%s>", address);
free(address);
+ if(!from)
+ return CURLE_OUT_OF_MEMORY;
}
else
/* Empty AUTH, RFC-2554, sect. 5 */
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 174/282: gtls: Fixed compilation when using GnuTLS < 3.5.0, (continued)
- [gnurl] 174/282: gtls: Fixed compilation when using GnuTLS < 3.5.0, gnunet, 2020/04/01
- [gnurl] 173/282: RELEASE-NOTES: Corrected the link to issue #4892, gnunet, 2020/04/01
- [gnurl] 176/282: runtests: restore the command log, gnunet, 2020/04/01
- [gnurl] 154/282: smtp: Added UTF-8 mailbox tests to verify existing behaviour, gnunet, 2020/04/01
- [gnurl] 167/282: test1323: Added the missing 'unit test' feature requirement in the test case, gnunet, 2020/04/01
- [gnurl] 177/282: tests: fix Python 3 compatibility of smbserver.py, gnunet, 2020/04/01
- [gnurl] 171/282: RELEASE-NOTES: synced, gnunet, 2020/04/01
- [gnurl] 175/282: smtp: fix memory leak on exit path, gnunet, 2020/04/01
- [gnurl] 183/282: TODO: curl --proxycommand, gnunet, 2020/04/01
- [gnurl] 179/282: ci/tests: align Azure Pipeline job names with each other, gnunet, 2020/04/01
- [gnurl] 182/282: smtp: overwriting 'from' leaks memory,
gnunet <=
- [gnurl] 186/282: md4: Use non-deprecated functions in mbedTLS >= 2.7.0, gnunet, 2020/04/01
- [gnurl] 180/282: ci/tests: Increase timeouts of Windows builds due to new tests, gnunet, 2020/04/01
- [gnurl] 184/282: pause: force-drain the transfer on unpause, gnunet, 2020/04/01
- [gnurl] 181/282: CIfuzz: switch off 'dry_run' mode, gnunet, 2020/04/01
- [gnurl] 178/282: ci/tests: Add Windows builds via Azure Pipelines using Docker, gnunet, 2020/04/01
- [gnurl] 191/282: runtests: fix output to command log, gnunet, 2020/04/01
- [gnurl] 187/282: md5: Use pointer notation for array parameters in GnuTLS implementation, gnunet, 2020/04/01
- [gnurl] 190/282: polarssl: Additional removal, gnunet, 2020/04/01
- [gnurl] 170/282: http2: make pausing/unpausing set/clear local stream window, gnunet, 2020/04/01
- [gnurl] 168/282: tests: Automatically deduce the tool name from the test case for unit tests, gnunet, 2020/04/01