Some ZTE modems used to convert any ussd strings in UCS2,
and so the buffer length is double. Considering the limit of
182 characters, 364 will avoid crash.
---
 drivers/atmodem/ussd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/atmodem/ussd.c b/drivers/atmodem/ussd.c
index 443251a..f5b38e2 100644
--- a/drivers/atmodem/ussd.c
+++ b/drivers/atmodem/ussd.c
@@ -106,7 +106,7 @@ static void cusd_parse(GAtResult *result, struct ofono_ussd 
*ussd)
        const char *content;
        int dcs;
        enum sms_charset charset;
-       unsigned char msg[160];
+       unsigned char msg[364];
        const unsigned char *msg_ptr = NULL;
        long msg_len;
 
-- 
1.7.5.4

_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to