aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
diff options
context:
space:
mode:
Diffstat (limited to 'asn1')
-rw-r--r--asn1/gsmmap/gsmmap.cnf16
1 files changed, 9 insertions, 7 deletions
diff --git a/asn1/gsmmap/gsmmap.cnf b/asn1/gsmmap/gsmmap.cnf
index 471300a223..0202674671 100644
--- a/asn1/gsmmap/gsmmap.cnf
+++ b/asn1/gsmmap/gsmmap.cnf
@@ -418,8 +418,10 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV;
guint8 out_len;
/* XXX - The maximum item label length is 240. Does this really need to be 1024?
* use ep_alloc ?
+ * We need a input and an output buffer to gsm_sms_char_ascii_decode()
*/
- static unsigned char bigbuf[1024];
+ static unsigned char msgbuf[1024];
+ static unsigned char outbuf[1024];
gchar *utf8_text = NULL;
GIConv cd;
GError *l_conv_error = NULL;
@@ -432,14 +434,14 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV;
switch(sms_encoding){
case SMS_ENCODING_7BIT:
case SMS_ENCODING_7BIT_LANG:
- out_len = gsm_sms_char_7bit_unpack(0, length, sizeof(bigbuf),
+ out_len = gsm_sms_char_7bit_unpack(0, length, sizeof(msgbuf),
tvb_get_ptr(parameter_tvb, 0, length),
- bigbuf);
+ msgbuf);
- bigbuf[out_len] = '\0';
- gsm_sms_char_ascii_decode(bigbuf, bigbuf, out_len);
- bigbuf[1023] = '\0';
- proto_tree_add_text(tree, parameter_tvb, 0, length, "USSD String: %%s", bigbuf);
+ msgbuf[out_len] = '\0';
+ gsm_sms_char_ascii_decode(outbuf, msgbuf, out_len);
+ msgbuf[1023] = '\0';
+ proto_tree_add_text(tree, parameter_tvb, 0, length, "USSD String: %%s", outbuf);
break;
case SMS_ENCODING_8BIT:
proto_tree_add_text(tree, parameter_tvb , 0, length, "USSD String: %%s", tvb_get_ptr(parameter_tvb, 0, length));