Open Source Telephony
 help / color / mirror / Atom feed
From: Nicolas Bertrand <nicolas.bertrand@linux.intel.com>
To: ofono@ofono.org
Subject: [PATCH 1/2] ussd: rise up buffer lenght for ussd strings
Date: Tue, 10 Apr 2012 17:35:04 +0200	[thread overview]
Message-ID: <1334072105-32105-2-git-send-email-nicolas.bertrand@linux.intel.com> (raw)
In-Reply-To: <1334072105-32105-1-git-send-email-nicolas.bertrand@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 689 bytes --]

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


  reply	other threads:[~2012-04-10 15:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-10 15:35 [PATCH 0/2] ussd fixes Nicolas Bertrand
2012-04-10 15:35 ` Nicolas Bertrand [this message]
2012-04-10 13:55   ` [PATCH 1/2] ussd: rise up buffer lenght for ussd strings Denis Kenzior
2012-04-10 15:35 ` [PATCH 2/2] ussd: Fix speedup ussd encoding Nicolas Bertrand
2012-04-10  7:53   ` Denis Kenzior
2012-04-10 21:22     ` Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1334072105-32105-2-git-send-email-nicolas.bertrand@linux.intel.com \
    --to=nicolas.bertrand@linux.intel.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox