cURL

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[curl:bugs] #1394 memory Leak in smtp.c

From: Jitendar Kumar <jitendar0009_at_users.sf.net>
Date: Tue, 08 Jul 2014 11:22:33 +0000

Hi,

The bugs were traced during static analysis of Curl code in imap.c, pop3.c and smtp.c.

eg : In file smtp.c : smtp_state_auth_cancel_resp()

snippet :
 
if(!result) {
/* Do we have any mechanisms left? */
    if(mech) {
    /* Retry SASL based authentication */
                result = smtp_perform_auth(conn, mech, initresp, len, state1, state2);

                Curl_safefree(initresp);
        }
        else {
                failf(data, "Authentication cancelled");
                result = CURLE_LOGIN_DENIED;
                }
}

The tool traced the bugs in case when "mech" is NULL( case : Authentication failed ").
In such scenario the "initresp" must be freed before return.

Similar scenario's in files imap.c, pop3.c and smtp.c.

Thanks and regards,
Jitendar Kumar

---
** [bugs:#1394] memory Leak in smtp.c**
**Status:** open
**Created:** Mon Jul 07, 2014 09:40 AM UTC by Jitendar Kumar
**Last Updated:** Mon Jul 07, 2014 07:30 PM UTC
**Owner:** Steve Holme
Some potential resource leaks found in lib/smtp.c . The attached patch fixes them. 
Thanks
---
Sent from sourceforge.net because curl-tracker@cool.haxx.se is subscribed to https://sourceforge.net/p/curl/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/curl/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.
Received on 2014-07-08

These mail archives are generated by hypermail.

donate! Page updated March 21, 2014.
web site info

File upload with ASP.NET