All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 1/4] tc65: Replace tc65 plugin with cinterion plugin
Date: Wed, 13 May 2015 15:58:32 -0500	[thread overview]
Message-ID: <5553BAF8.7090109@gmail.com> (raw)
In-Reply-To: <20150513151821.GC28082@rincewind.trouble.is>

[-- Attachment #1: Type: text/plain, Size: 776 bytes --]

Hi Philip,

 >> +static void cinterion_set_online(struct ofono_modem *modem, 
ofono_bool_t online,
>> +			ofono_modem_online_cb_t cb, void *user_data)
>> +{
>> +	GAtChat *chat = ofono_modem_get_data(modem);
>> +	struct cb_data *cbd = cb_data_new(cb, user_data);
>> +	char const *command = online ? "AT+CFUN=1" : "AT+CFUN=7";
>> +
>> +	DBG("modem %p %s", modem, online ? "online" : "offline");
>> +
>> +	if (g_at_chat_send(chat, command, NULL, set_online_cb, cbd, g_free))
>> +		return;
>> +
>> +	g_free(cbd);
>> +
>> +	CALLBACK_WITH_FAILURE(cb, cbd->data);
>> +}
>
> Doesn't this expand into a use after free bug if g_at_chat_send() fails?
>

Yes it does!  I fixed a few more occurrences of this bug.  Thanks for 
pointing it out.

Regards,
-Denis

      parent reply	other threads:[~2015-05-13 20:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-12 17:22 [PATCH 1/4] tc65: Replace tc65 plugin with cinterion plugin Alex J Lennon
2015-05-12 17:23 ` [PATCH 2/4] atmodem: Add Cinterion quirk for signal strength Alex J Lennon
2015-05-13 14:58   ` Denis Kenzior
2015-05-12 17:23 ` [PATCH 3/4] cinterion: Register as OFONO_VENDOR_CINTERION Alex J Lennon
2015-05-13 14:59   ` Denis Kenzior
2015-05-12 17:23 ` [PATCH 4/4] udev: Add support for ehs6 name Alex J Lennon
2015-05-13 14:59   ` Denis Kenzior
2015-05-13 14:58 ` [PATCH 1/4] tc65: Replace tc65 plugin with cinterion plugin Denis Kenzior
2015-05-13 15:18 ` Philip Paeps
2015-05-13 16:11   ` Alex J Lennon
2015-05-13 20:58   ` Denis Kenzior [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5553BAF8.7090109@gmail.com \
    --to=denkenz@gmail.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.