case SMS_ENCODING_UCS2:
case SMS_ENCODING_UCS2_LANG:
- input_string = tvb_get_string(wmem_packet_scope(), tvb, offset, length);
+ input_string = (guint8 *)tvb_memdup(wmem_packet_scope(), tvb, offset, length);
if ((cd = g_iconv_open("UTF-8","UCS-2BE")) != (GIConv) -1)
{
utf8_text = g_convert_with_iconv(input_string, length, cd, NULL, NULL, &l_conv_error);
dissect_radius_qos_umts(proto_tree * tree, tvbuff_t * tvb, packet_info* pinfo _U_)
{
decode_qos_umts(tvb, 0, tree, "UMTS GTP QoS Profile", 3);
- return tvb_get_string(wmem_packet_scope(), tvb, 0, tvb_length(tvb));
+ return (gchar *)tvb_memdup(wmem_packet_scope(), tvb, 0, tvb_length(tvb));
}
#define MAX_APN_LENGTH 100
if (len <= 0)
return;
- buf = tvb_get_string(wmem_packet_scope(), tvb, 3, len);
+ buf = (guint8 *)tvb_memdup(wmem_packet_scope(), tvb, 3, len);
EBCDIC_to_ASCII(buf, len);
proto_tree_add_string(tree, hf_sna_control_0e_value, tvb, 3, len, (char *)buf);
}
guint8 crc = 0;
guint8 * data = NULL;
/* Get data. */
- data = tvb_get_string(wmem_packet_scope(), tvb, 0, tvb_length(tvb));
+ data = (guint8 *)tvb_memdup(wmem_packet_scope(), tvb, 0, tvb_length(tvb));
/* Include only FT flag bit in CRC calculation. */
data[0] = data[0] & 1;
/* Calculate crc7 sum. */
guint8 crc = 0;
guint8 * data = NULL;
/* Get data of header with first byte removed. */
- data = tvb_get_string(wmem_packet_scope(), tvb, 1, header_length-1);
+ data = (guint8 *)tvb_memdup(wmem_packet_scope(), tvb, 1, header_length-1);
/* Calculate crc7 sum. */
crc = crc7update(0, data, header_length-1);
crc = crc7finalize(crc); /* finalize crc */
/* First create new subset of header with first byte removed. */
tvbuff_t * headtvb = tvb_new_subset(tvb, 1, header_length-1, header_length-1);
/* Get data of header with first byte removed. */
- data = tvb_get_string(wmem_packet_scope(), headtvb, 0, header_length-1);
+ data = (guint8 *)tvb_memdup(wmem_packet_scope(), headtvb, 0, header_length-1);
/* Remove first 4 bits of the remaining data which are Header CRC cont. */
data[0] = data[0] & 0x0f;
crc = crc11_307_noreflect_noxor(data, header_length-1);
ENC_BIG_ENDIAN);
if (preferences_payload_checksum) {
guint16 calc_crc, read_crc;
- guint8 * data = tvb_get_string(wmem_packet_scope(), tvb, header_length, offset-header_length);
+ guint8 * data = (guint8 *)tvb_memdup(wmem_packet_scope(), tvb, header_length, offset-header_length);
calc_crc = crc16_8005_noreflect_noxor(data, offset-header_length);
read_crc = tvb_get_bits16(tvb, offset*8, 16, FALSE);