* [PATCH] sim: fix num_params in ril_query_facility_lock_cb
@ 2016-08-06 4:33 Samrat Guha Niyogi
2016-08-06 16:06 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: Samrat Guha Niyogi @ 2016-08-06 4:33 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 720 bytes --]
---
drivers/rilmodem/sim.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/rilmodem/sim.c b/drivers/rilmodem/sim.c
index 74f9d6b..b34723f 100644
--- a/drivers/rilmodem/sim.c
+++ b/drivers/rilmodem/sim.c
@@ -1424,12 +1424,17 @@ static void ril_query_facility_lock_cb(struct ril_msg *message,
struct sim_data *sd = cbd->user;
struct parcel rilp;
ofono_bool_t status;
+ int numparams;
if (message->error != RIL_E_SUCCESS)
goto error;
g_ril_init_parcel(message, &rilp);
+ numparams = parcel_r_int32(&rilp);
+ if (numparams < 1)
+ goto error;
+
status = (ofono_bool_t) parcel_r_int32(&rilp);
g_ril_append_print_buf(sd->ril, "{%d}", status);
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-06 16:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-06 4:33 [PATCH] sim: fix num_params in ril_query_facility_lock_cb Samrat Guha Niyogi
2016-08-06 16:06 ` Denis Kenzior
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.