Pascal Quantin
changed
bug 8747
Comment # 7
on bug 8747
from Pascal Quantin
Hi Reinhard,
I guess it's allowed to have a <CR> in the middle of the CBS content. Instead
of searching for the first <CR>, shouldn't we do a backward search and loop
until we have no <CR>?
Index: epan/dissectors/packet-cell_broadcast.c
===================================================================
--- epan/dissectors/packet-cell_broadcast.c (revision 49709)
+++ epan/dissectors/packet-cell_broadcast.c (working copy)
@@ -254,7 +254,7 @@
guint8 out_len;
int length = tvb_length(tvb) - offset;
gchar *utf8_text = NULL;
- static unsigned char msgbuf[1024];
+ static unsigned char msgbuf[1024], *cp;
guint8 * input_string = tvb_get_ephemeral_string(tvb, offset, length);
GIConv cd;
GError *l_conv_error = NULL;
@@ -265,6 +265,9 @@
out_len = gsm_sms_char_7bit_unpack(0, length, sizeof(msgbuf),
input_string,
msgbuf);
+ while (out_len && msgbuf[out_len-1] == '\r') {
+ out_len--;
+ }
msgbuf[out_len] = '\0';
utf8_text = gsm_sms_chars_to_utf8(msgbuf, out_len);
tvb_out = tvb_new_child_real_data(tvb, utf8_text, out_len, out_len);
Thanks,
Pascal.
You are receiving this mail because:
- You are watching all bug changes.