[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 37/73: smtp_done: free data before returning (on se
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 37/73: smtp_done: free data before returning (on send failure) |
Date: |
Tue, 24 Oct 2017 18:54:18 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 38ab7b4ccb18f03c0323d412ff0f3613cd66f5e5
Author: Daniel Stenberg <address@hidden>
AuthorDate: Tue Oct 10 14:34:57 2017 +0200
smtp_done: free data before returning (on send failure)
... as otherwise it could leak that memory.
Detected by OSS-fuzz:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3600
Assisted-by: Max Dymond
Closes #1977
---
lib/smtp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/smtp.c b/lib/smtp.c
index de2dd3356..08d8148a3 100644
--- a/lib/smtp.c
+++ b/lib/smtp.c
@@ -1188,6 +1188,9 @@ static CURLcode smtp_done(struct connectdata *conn,
CURLcode status,
if(!smtp || !pp->conn)
return CURLE_OK;
+ /* Cleanup our per-request based variables */
+ Curl_safefree(smtp->custom);
+
if(status) {
connclose(conn, "SMTP done with bad status"); /* marked for closure */
result = status; /* use the already set error code */
@@ -1246,9 +1249,6 @@ static CURLcode smtp_done(struct connectdata *conn,
CURLcode status,
result = smtp_block_statemach(conn);
}
- /* Cleanup our per-request based variables */
- Curl_safefree(smtp->custom);
-
/* Clear the transfer mode for the next request */
smtp->transfer = FTPTRANSFER_BODY;
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 11/73: strtoofft: Remove extraneous null check, (continued)
- [GNUnet-SVN] [gnurl] 11/73: strtoofft: Remove extraneous null check, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 19/73: docs: clarify form/mime usage of non-regular data files., gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 66/73: test653: check reuse of easy handle after mime data change, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 62/73: vtls: change struct Curl_ssl `close' field name to `close_one'., gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 57/73: setopt: range check most long options, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 60/73: test652: curl_mime_data + base64 encoder with large contents, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 23/73: mime: improve unbinding top multipart from easy handle., gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 13/73: vtls: fix warnings with --disable-crypto-auth, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 28/73: RTSP: avoid integer overflow on funny RTSP response, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 18/73: Revert "multi_done: wait for name resolve to finish if still ongoing", gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 37/73: smtp_done: free data before returning (on send failure),
gnunet <=
- [GNUnet-SVN] [gnurl] 21/73: curlver.h: next expected release is 7.57.0, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 27/73: ftpserver: properly reset $ftptargetdir., gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 36/73: FTP: URL decode path for dir listing in nocwd mode, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 31/73: openssl: enable PKCS12 support for !BoringSSL, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 40/73: openssl: don't use old BORINGSSL_YYYYMM macros, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 41/73: url: Update current connection SSL verify params in setopt, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 29/73: mime: properly unbind mime structure in curl_mime_free()., gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 32/73: FAQ: s/CURLOPT_PROGRESSFUNCTION/CURLOPT_XFERINFOFUNCTION, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 34/73: CURLOPT_XFERINFODATA.3: fix duplicate see also, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 46/73: cli tool: use file2memory() to buffer stdin in -F option., gnunet, 2017/10/24