Merge lp:~phablet-team/ofono/lp-1260388 into lp:~phablet-team/ofono/ubuntu

Proposed by Tony Espy
Status: Merged
Merged at revision: 6847
Proposed branch: lp:~phablet-team/ofono/lp-1260388
Merge into: lp:~phablet-team/ofono/ubuntu
Diff against target: 36 lines (+9/-3)
2 files modified
debian/changelog (+7/-0)
drivers/rilmodem/sms.c (+2/-3)
To merge this branch: bzr merge lp:~phablet-team/ofono/lp-1260388
Reviewer Review Type Date Requested Status
Ricardo Salveti (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+198845@code.launchpad.net

Commit message

rilmodem/sms: Don't parse SMS error reply (LP: #1260388)

Description of the change

This fixes a crash when an error reply is received from rild for a SMS request. In this case, the returned message is zero-length, but the code attempts to parse it anyways, resulting in a crash in parcel.c:parcel_r_int32().

Tested on maguro r62 by sending a couple text messages abd verifying no crashes occurred.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Tested with maguro, working as expected.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-12-10 01:06:29 +0000
3+++ debian/changelog 2013-12-12 23:28:14 +0000
4@@ -1,3 +1,10 @@
5+ofono (1.12+bzr6847-0ubuntu1) UNRELEASED; urgency=low
6+
7+ [ Tony Espy ]
8+ * rilmodem/sms: Don't parse SMS error reply (LP: #1260388)
9+
10+ -- Tony Espy <espy@canonical.com> Thu, 12 Dec 2013 17:15:01 -0500
11+
12 ofono (1.12+bzr6846-0ubuntu1) trusty; urgency=low
13
14 [ Alfonso Sanchez-Beato ]
15
16=== modified file 'drivers/rilmodem/sms.c'
17--- drivers/rilmodem/sms.c 2013-11-19 11:18:44 +0000
18+++ drivers/rilmodem/sms.c 2013-12-12 23:28:14 +0000
19@@ -144,16 +144,15 @@
20 struct ofono_error error;
21 ofono_sms_submit_cb_t cb = cbd->cb;
22 struct sms_data *sd = cbd->user;
23- int mr;
24+ int mr = 0;
25
26 if (message->error == RIL_E_SUCCESS) {
27 decode_ril_error(&error, "OK");
28+ mr = g_ril_reply_parse_sms_response(sd->ril, message);
29 } else {
30 decode_ril_error(&error, "FAIL");
31 }
32
33- mr = g_ril_reply_parse_sms_response(sd->ril, message);
34-
35 cb(&error, mr, cbd->data);
36 }
37

Subscribers

People subscribed via source and target branches

to all changes: