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
=== modified file 'debian/changelog'
--- debian/changelog 2013-12-10 01:06:29 +0000
+++ debian/changelog 2013-12-12 23:28:14 +0000
@@ -1,3 +1,10 @@
1ofono (1.12+bzr6847-0ubuntu1) UNRELEASED; urgency=low
2
3 [ Tony Espy ]
4 * rilmodem/sms: Don't parse SMS error reply (LP: #1260388)
5
6 -- Tony Espy <espy@canonical.com> Thu, 12 Dec 2013 17:15:01 -0500
7
1ofono (1.12+bzr6846-0ubuntu1) trusty; urgency=low8ofono (1.12+bzr6846-0ubuntu1) trusty; urgency=low
29
3 [ Alfonso Sanchez-Beato ]10 [ Alfonso Sanchez-Beato ]
411
=== modified file 'drivers/rilmodem/sms.c'
--- drivers/rilmodem/sms.c 2013-11-19 11:18:44 +0000
+++ drivers/rilmodem/sms.c 2013-12-12 23:28:14 +0000
@@ -144,16 +144,15 @@
144 struct ofono_error error;144 struct ofono_error error;
145 ofono_sms_submit_cb_t cb = cbd->cb;145 ofono_sms_submit_cb_t cb = cbd->cb;
146 struct sms_data *sd = cbd->user;146 struct sms_data *sd = cbd->user;
147 int mr;147 int mr = 0;
148148
149 if (message->error == RIL_E_SUCCESS) {149 if (message->error == RIL_E_SUCCESS) {
150 decode_ril_error(&error, "OK");150 decode_ril_error(&error, "OK");
151 mr = g_ril_reply_parse_sms_response(sd->ril, message);
151 } else {152 } else {
152 decode_ril_error(&error, "FAIL");153 decode_ril_error(&error, "FAIL");
153 }154 }
154155
155 mr = g_ril_reply_parse_sms_response(sd->ril, message);
156
157 cb(&error, mr, cbd->data);156 cb(&error, mr, cbd->data);
158}157}
159158

Subscribers

People subscribed via source and target branches

to all changes: