From c97489a16113c95275c4ea60f3af3ff65a04466c Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Wed, 15 Sep 2010 12:11:08 -0500 Subject: ussd: Tweak buffer size --- drivers/atmodem/ussd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/atmodem/ussd.c b/drivers/atmodem/ussd.c index 332e07f1..f38dfd04 100644 --- a/drivers/atmodem/ussd.c +++ b/drivers/atmodem/ussd.c @@ -72,9 +72,9 @@ static const unsigned char *ucs2_gsm_to_packed(const char *content, unsigned char *gsm; long written; unsigned char *packed; - unsigned char buf[182 * 4]; /* 182 USSD chars * 2 (UCS2) * 2 (hex) */ + unsigned char buf[182 * 2]; /* 182 USSD chars * 2 (UCS2) */ - if (strlen(content) > sizeof(buf)) + if (strlen(content) > sizeof(buf) * 2) /* Hex, 2 chars / byte */ return NULL; decoded = decode_hex_own_buf(content, -1, &len, 0, buf); -- cgit v1.2.3