From ae25d1e91089b0fd73fd22692aaa81889425aa93 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Tue, 2 Feb 2010 11:13:06 -0600 Subject: [PATCH] Fix: Ignore CBM pdus bigger than 88 bytes --- drivers/atmodem/cbs.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/atmodem/cbs.c b/drivers/atmodem/cbs.c index 661207b..39f019b 100644 --- a/drivers/atmodem/cbs.c +++ b/drivers/atmodem/cbs.c @@ -66,6 +66,11 @@ static void at_cbm_notify(GAtResult *result, gpointer user_data) if (!g_at_result_iter_next_number(&iter, &pdulen)) return; + if (pdulen > 88) { + ofono_error("Got a CBM message bigger than maximum size!"); + return; + } + hexpdu = g_at_result_pdu(result); if (!hexpdu) { -- 2.7.4