emem -> wmem conversion:

- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits()
- tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup()
- tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode()
- tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string()
- tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string()
- tvb_get_ephemeral_string_enc() -> tvb_get_string_enc()
- update docs accordingly

svn path=/trunk/; revision=52172
This commit is contained in:
Pascal Quantin 2013-09-22 15:50:55 +00:00
parent c4a608a940
commit a0c53ffaa1
272 changed files with 992 additions and 1164 deletions

View File

@ -705,7 +705,7 @@ dissect_ansi_map_digits_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
return;
offset++;
proto_tree_add_item(subtree, hf_ansi_map_ia5_digits, tvb, offset, -1, ENC_ASCII|ENC_NA);
proto_item_append_text(actx->created_item, " - %s", tvb_get_ephemeral_string(tvb,offset,tvb_length_remaining(tvb,offset)));
proto_item_append_text(actx->created_item, " - %s", tvb_get_string(wmem_packet_scope(),tvb,offset,tvb_length_remaining(tvb,offset)));
break;
case 3:
/* Octet string */
@ -738,7 +738,7 @@ dissect_ansi_map_digits_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
case 2:
/* IA5 Coding */
proto_tree_add_item(subtree, hf_ansi_map_ia5_digits, tvb, offset, -1, ENC_ASCII|ENC_NA);
proto_item_append_text(actx->created_item, " - %s", tvb_get_ephemeral_string(tvb,offset,tvb_length_remaining(tvb,offset)));
proto_item_append_text(actx->created_item, " - %s", tvb_get_string(wmem_packet_scope(),tvb,offset,tvb_length_remaining(tvb,offset)));
break;
case 3:
/* Octet string */

View File

@ -301,11 +301,11 @@ static uat_t *c1222_uat;
#define FILL_START int length, start_offset = offset;
#define FILL_TABLE(fieldname) \
length = offset - start_offset; \
fieldname = (guint8 *)tvb_g_memdup(tvb, start_offset, length); \
fieldname = (guint8 *)tvb_memdup(NULL, tvb, start_offset, length); \
fieldname##_len = length;
#define FILL_TABLE_TRUNCATE(fieldname, len) \
length = 1 + 2*(offset - start_offset); \
fieldname = (guint8 *)tvb_g_memdup(tvb, start_offset, length); \
fieldname = (guint8 *)tvb_memdup(NULL, tvb, start_offset, length); \
fieldname##_len = len;
#else /* HAVE_LIBGCRYPT */
#define FILL_TABLE(fieldname)
@ -388,7 +388,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
user_id = tvb_get_ntohs(tvb, *offset);
proto_tree_add_uint(tree, hf_c1222_logon_id, tvb, *offset, 2, user_id);
*offset += 2;
user_name = tvb_get_ephemeral_string(tvb, *offset, 10);
user_name = tvb_get_string(wmem_packet_scope(),tvb, *offset, 10);
proto_tree_add_string(tree, hf_c1222_logon_user, tvb, *offset, 10, user_name);
*offset += 10;
*length -= 12;
@ -400,7 +400,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
break;
case C1222_CMD_SECURITY:
if (*length >= 20) {
password = tvb_get_ephemeral_string(tvb, *offset, 20);
password = tvb_get_string(wmem_packet_scope(),tvb, *offset, 20);
proto_tree_add_string(tree, hf_c1222_security_password, tvb, *offset, 20, password);
*offset += 20;
*length -= 20;
@ -919,7 +919,7 @@ dissect_epsem(tvbuff_t *tvb, int offset, guint32 len, packet_info *pinfo, proto_
return offset;
encrypted = TRUE;
if (c1222_decrypt) {
buffer = (guchar *)tvb_g_memdup(tvb, offset, len2);
buffer = (guchar *)tvb_memdup(NULL, tvb, offset, len2);
if (!decrypt_packet(buffer, len2, TRUE)) {
g_free(buffer);
crypto_bad = TRUE;
@ -938,7 +938,7 @@ dissect_epsem(tvbuff_t *tvb, int offset, guint32 len, packet_info *pinfo, proto_
len2 = tvb_length_remaining(tvb, offset);
if (len2 <= 0)
return offset;
buffer = (guchar *)tvb_g_memdup(tvb, offset, len2);
buffer = (guchar *)tvb_memdup(NULL, tvb, offset, len2);
epsem_buffer = tvb_new_subset_remaining(tvb, offset);
if (c1222_decrypt) {
if (!decrypt_packet(buffer, len2, FALSE)) {

View File

@ -120,7 +120,7 @@ ess_dissect_attribute_flags (tvbuff_t *tvb, asn1_ctx_t *actx)
guint i;
tree = proto_item_add_subtree (actx->created_item, ett_Category_attributes);
value = tvb_get_ephemeral_string (tvb, 0, tvb_length (tvb));
value = tvb_get_string (wmem_packet_scope(), tvb, 0, tvb_length (tvb));
for (i = 0; i < num_ess_category_attributes; i++) {
ess_category_attributes_t *u = &(ess_category_attributes[i]);

View File

@ -77,15 +77,15 @@ GPRSRecord
return offset;
proto_item_append_text(actx->created_item, " (UTC %%x-%%x-%%x %%x:%%x:%%x %%s%%x:%%x)",
tvb_get_guint8(parameter_tvb,0), /* Year */
tvb_get_guint8(parameter_tvb,1), /* Month */
tvb_get_guint8(parameter_tvb,2), /* Day */
tvb_get_guint8(parameter_tvb,3), /* Hour */
tvb_get_guint8(parameter_tvb,4), /* Minute */
tvb_get_guint8(parameter_tvb,5), /* Second */
tvb_get_ephemeral_string(parameter_tvb,6,1), /* Sign */
tvb_get_guint8(parameter_tvb,7), /* Hour */
tvb_get_guint8(parameter_tvb,8) /* Minute */
tvb_get_guint8(parameter_tvb,0), /* Year */
tvb_get_guint8(parameter_tvb,1), /* Month */
tvb_get_guint8(parameter_tvb,2), /* Day */
tvb_get_guint8(parameter_tvb,3), /* Hour */
tvb_get_guint8(parameter_tvb,4), /* Minute */
tvb_get_guint8(parameter_tvb,5), /* Second */
tvb_get_string(wmem_packet_scope(), parameter_tvb,6,1), /* Sign */
tvb_get_guint8(parameter_tvb,7), /* Hour */
tvb_get_guint8(parameter_tvb,8) /* Minute */
);
#.FN_BODY MSTimeZone VAL_PTR = &parameter_tvb

View File

@ -499,7 +499,7 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV;
proto_tree_add_text(tree, parameter_tvb, 0, length, "USSD String: %%s", utf8_text);
break;
case SMS_ENCODING_8BIT:
proto_tree_add_text(tree, parameter_tvb , 0, length, "USSD String: %%s", tvb_get_ephemeral_string(parameter_tvb, 0, length));
proto_tree_add_text(tree, parameter_tvb , 0, length, "USSD String: %%s", tvb_get_string(wmem_packet_scope(), parameter_tvb, 0, length));
break;
case SMS_ENCODING_UCS2:
case SMS_ENCODING_UCS2_LANG:
@ -880,7 +880,7 @@ if (!actx->value_ptr)
length = tvb_length(parameter_tvb);
name_len = tvb_get_guint8(parameter_tvb, 0);
apn_str = tvb_get_ephemeral_string(parameter_tvb, 1, length - 1);
apn_str = tvb_get_string(wmem_packet_scope(), parameter_tvb, 1, length - 1);
if (name_len < length-1) {
for (;;) {
if (name_len >= length - 1)

View File

@ -339,7 +339,7 @@ AuditReplyV1/auditResult audit_result
curr_info.term->type = 0; /* unknown */
if (curr_info.term->len) {
curr_info.term->buffer = (guint8 *)ep_tvb_memdup(new_tvb,0,curr_info.term->len);
curr_info.term->buffer = (guint8 *)tvb_memdup(wmem_packet_scope(),new_tvb,0,curr_info.term->len);
curr_info.term->str = bytes_to_str(curr_info.term->buffer,curr_info.term->len);
}

View File

@ -64,7 +64,7 @@ PasswordPolicyResponseValue B "1.3.6.1.4.1.42.2.27.8.5.1" "passwordPolicy"
if (!parameter_tvb)
return offset;
object_identifier_id = tvb_get_ephemeral_string(parameter_tvb, 0, tvb_length_remaining(parameter_tvb,0));
object_identifier_id = tvb_get_string(wmem_packet_scope(), parameter_tvb, 0, tvb_length_remaining(parameter_tvb,0));
name = oid_resolved_from_string(object_identifier_id);
if(name){
@ -194,7 +194,7 @@ char *mechanism = NULL;
* different type and/or mechanism.
*/
if(!actx->pinfo->fd->flags.visited) {
mechanism = tvb_get_g_string(parameter_tvb, 0, tvb_length_remaining(parameter_tvb,0));
mechanism = tvb_get_string(NULL, parameter_tvb, 0, tvb_length_remaining(parameter_tvb,0));
ldap_info->first_auth_frame = 0; /* not known until we see the bind reply */
/*
* If the mechanism in this request is an empty string (which is
@ -330,7 +330,7 @@ ldap_conv_info_t *ldap_info;
ldap_do_protocolop(actx->pinfo);
if(parameter_tvb)
ldapstring = tvb_get_ephemeral_string(parameter_tvb, 0, tvb_length_remaining(parameter_tvb, 0));
ldapstring = tvb_get_string(wmem_packet_scope(), parameter_tvb, 0, tvb_length_remaining(parameter_tvb, 0));
if(hf_index == hf_ldap_baseObject) {
/* this is search - put it on the scanline */
@ -485,7 +485,7 @@ ldap_conv_info_t *ldap_info;
break;
if(i == len) {
string = tvb_get_ephemeral_string(next_tvb, 0, tvb_length_remaining(next_tvb, 0));
string = tvb_get_string(wmem_packet_scope(), next_tvb, 0, tvb_length_remaining(next_tvb, 0));
proto_item_set_text(actx->created_item, "AttributeValue: %%s", string);
}
}

View File

@ -1666,7 +1666,7 @@ dissect_ldap_oid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
* proto_tree_add_oid() instead.
*/
oid=tvb_get_ephemeral_string(tvb, 0, tvb_length(tvb));
oid=tvb_get_string(wmem_packet_scope(), tvb, 0, tvb_length(tvb));
if(!oid){
return;
}

View File

@ -489,7 +489,7 @@ SystemInformationBlockType9/hnb-Name TYPE=FT_STRING DISPLAY=BASE_NONE
%(DEFAULT_BODY)s
actx->created_item = proto_tree_add_unicode_string(tree, hf_index, hnb_name_tvb, 0, -1,
tvb_get_ephemeral_string_enc(hnb_name_tvb, 0, tvb_length(hnb_name_tvb), ENC_UTF_8 | ENC_NA));
tvb_get_string_enc(wmem_packet_scope(), hnb_name_tvb, 0, tvb_length(hnb_name_tvb), ENC_UTF_8 | ENC_NA));
#.TYPE_ATTR
SystemInformationBlockType10/messageIdentifier TYPE=FT_UINT16 DISPLAY=BASE_DEC|BASE_EXT_STRING STRINGS=&lte_rrc_messageIdentifier_vals_ext

View File

@ -1938,7 +1938,7 @@ dissect_lte_rrc_warningMessageSegment(tvbuff_t *warning_msg_seg_tvb, proto_tree
cb_data_page_tvb = tvb_new_subset(warning_msg_seg_tvb, offset, length, length);
cb_data_tvb = dissect_cbs_data(dataCodingScheme, cb_data_page_tvb, tree, pinfo, 0);
if (cb_data_tvb) {
str = tvb_get_ephemeral_string(cb_data_tvb, 0, tvb_length(cb_data_tvb));
str = tvb_get_string(wmem_packet_scope(), cb_data_tvb, 0, tvb_length(cb_data_tvb));
proto_tree_add_string_format(tree, hf_lte_rrc_warningMessageSegment_decoded_page, warning_msg_seg_tvb, offset, 83,
str, "Decoded Page %u: %s", i+1, str);
}

View File

@ -111,7 +111,7 @@ generate_key_or_iv(unsigned int id, tvbuff_t *salt_tvb, unsigned int iter,
cur_keylen = 0;
salt_size = tvb_length(salt_tvb);
salt_p = tvb_get_ephemeral_string(salt_tvb, 0, salt_size);
salt_p = tvb_get_string(wmem_packet_scope(), salt_tvb, 0, salt_size);
if (pw == NULL)
pwlen = 0;
@ -307,7 +307,7 @@ int PBE_decrypt_data(const char *object_identifier_id_param, tvbuff_t *encrypted
datalen = tvb_length(encrypted_tvb);
clear_data = (char *)g_malloc(datalen);
err = gcry_cipher_decrypt (cipher, clear_data, datalen, tvb_get_ephemeral_string(encrypted_tvb, 0, datalen), datalen);
err = gcry_cipher_decrypt (cipher, clear_data, datalen, tvb_get_string(wmem_packet_scope(), encrypted_tvb, 0, datalen), datalen);
if (gcry_err_code (err)) {
proto_item_append_text(item, " [Failed to decrypt with password preference]");

View File

@ -201,7 +201,7 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound")
&& ! actx->pinfo->sccp_info->data.co.assoc->calling_party ) {
guint len = tvb_length(imsi_tvb);
guint8* bytes = (guint8 *)ep_tvb_memdup(imsi_tvb,0,len);
guint8* bytes = (guint8 *)tvb_memdup(wmem_packet_scope(),imsi_tvb,0,len);
actx->pinfo->sccp_info->data.co.assoc->calling_party =
wmem_strdup_printf(wmem_file_scope(), "IMSI: %%s", bytes_to_str(bytes, len) );

View File

@ -652,7 +652,7 @@ HNBName TYPE=FT_STRING DISPLAY=BASE_NONE
%(DEFAULT_BODY)s
actx->created_item = proto_tree_add_unicode_string(tree, hf_index, hnbname_tvb, 0, -1,
tvb_get_ephemeral_string_enc(hnbname_tvb, 0, tvb_length(hnbname_tvb), ENC_UTF_8 | ENC_NA));
tvb_get_string_enc(wmem_packet_scope(), hnbname_tvb, 0, tvb_length(hnbname_tvb), ENC_UTF_8 | ENC_NA));
#.FN_BODY CN-DomainIdentity VAL_PTR = &nas_sys_info_gsm_map
guint32 nas_sys_info_gsm_map;

View File

@ -158,7 +158,7 @@ dissect_sabp_cb_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (unpacked_tvb != NULL){
if (tree != NULL){
proto_tree *cbs_page_subtree = proto_item_add_subtree(cbs_page_item, ett_sabp_cbs_page_content);
proto_tree_add_string(cbs_page_subtree, hf_sabp_cbs_page_content, unpacked_tvb, 0, len, tvb_get_ephemeral_string(unpacked_tvb, 0, len));
proto_tree_add_string(cbs_page_subtree, hf_sabp_cbs_page_content, unpacked_tvb, 0, len, tvb_get_string(wmem_packet_scope(), unpacked_tvb, 0, len));
}
}

View File

@ -430,7 +430,7 @@ dissect_snmp_variable_date_and_time(proto_tree *tree,int hfid, tvbuff_t *tvb, in
minutes,
seconds,
deci_seconds,
tvb_get_ephemeral_string(tvb,offset+8,1),
tvb_get_string(wmem_packet_scope(),tvb,offset+8,1),
hour_from_utc,
min_from_utc);
}else{
@ -610,7 +610,7 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
pt_name = proto_item_add_subtree(pi_name,ett_name);
/* fetch ObjectName and its relative oid_info */
oid_bytes = (guint8*)ep_tvb_memdup(tvb, name_offset, name_len);
oid_bytes = (guint8*)tvb_memdup(wmem_packet_scope(), tvb, name_offset, name_len);
oid_info = oid_get_from_encoded(oid_bytes, name_len, &subids, &oid_matched, &oid_left);
add_oid_debug_subtree(oid_info,pt_name);
@ -1406,8 +1406,8 @@ get_user_assoc(tvbuff_t* engine_tvb, tvbuff_t* user_tvb)
given_username_len = tvb_length(user_tvb);
given_engine_len = tvb_length(engine_tvb);
if (! ( given_engine_len && given_username_len ) ) return NULL;
given_username = (guint8*)ep_tvb_memdup(user_tvb,0,-1);
given_engine = (guint8*)ep_tvb_memdup(engine_tvb,0,-1);
given_username = (guint8*)tvb_memdup(wmem_packet_scope(),user_tvb,0,-1);
given_engine = (guint8*)tvb_memdup(wmem_packet_scope(),engine_tvb,0,-1);
for (a = localized_ues; a; a = a->next) {
if ( localized_match(a, given_username, given_username_len, given_engine, given_engine_len) ) {
@ -1466,10 +1466,10 @@ snmp_usm_auth_md5(snmp_usm_params_t* p, guint8** calc_auth_p, guint* calc_auth_l
*error = "Not enough data remaining";
return FALSE;
}
msg = (guint8*)ep_tvb_memdup(p->msg_tvb,0,msg_len);
msg = (guint8*)tvb_memdup(wmem_packet_scope(),p->msg_tvb,0,msg_len);
auth = (guint8*)ep_tvb_memdup(p->auth_tvb,0,auth_len);
auth = (guint8*)tvb_memdup(wmem_packet_scope(),p->auth_tvb,0,auth_len);
start = p->auth_offset - p->start_offset;
end = start + auth_len;
@ -1531,9 +1531,9 @@ snmp_usm_auth_sha1(snmp_usm_params_t* p _U_, guint8** calc_auth_p, guint* calc_a
*error = "Not enough data remaining";
return FALSE;
}
msg = (guint8*)ep_tvb_memdup(p->msg_tvb,0,msg_len);
msg = (guint8*)tvb_memdup(wmem_packet_scope(),p->msg_tvb,0,msg_len);
auth = (guint8*)ep_tvb_memdup(p->auth_tvb,0,auth_len);
auth = (guint8*)tvb_memdup(wmem_packet_scope(),p->auth_tvb,0,auth_len);
start = p->auth_offset - p->start_offset;
end = start + auth_len;
@ -1579,7 +1579,7 @@ snmp_usm_priv_des(snmp_usm_params_t* p _U_, tvbuff_t* encryptedData _U_, gchar c
return NULL;
}
salt = (guint8*)ep_tvb_memdup(p->priv_tvb,0,salt_len);
salt = (guint8*)tvb_memdup(wmem_packet_scope(),p->priv_tvb,0,salt_len);
/*
The resulting "salt" is XOR-ed with the pre-IV to obtain the IV.
@ -1595,7 +1595,7 @@ snmp_usm_priv_des(snmp_usm_params_t* p _U_, tvbuff_t* encryptedData _U_, gchar c
return NULL;
}
cryptgrm = (guint8*)ep_tvb_memdup(encryptedData,0,-1);
cryptgrm = (guint8*)tvb_memdup(wmem_packet_scope(),encryptedData,0,-1);
cleartext = (guint8*)g_malloc(cryptgrm_len);
@ -1667,7 +1667,7 @@ snmp_usm_priv_aes_common(snmp_usm_params_t* p, tvbuff_t* encryptedData, gchar co
*error = "Not enough data remaining";
return NULL;
}
cryptgrm = (guint8*)ep_tvb_memdup(encryptedData,0,-1);
cryptgrm = (guint8*)tvb_memdup(wmem_packet_scope(),encryptedData,0,-1);
cleartext = (guint8*)g_malloc(cryptgrm_len);

View File

@ -154,7 +154,7 @@ RegistryAllocateHandleResponse/result AllocateHandleResponseResult
if(next_tvb) {
ns = tvb_get_g_string(t124NSIdentifier, 0, tvb_length(t124NSIdentifier));
ns = tvb_get_string(NULL, t124NSIdentifier, 0, tvb_length(t124NSIdentifier));
if(ns != NULL) {
dissector_try_string(t124_ns_dissector_table, ns, next_tvb, actx->pinfo, top_tree);
g_free(ns);

View File

@ -385,7 +385,7 @@ XDayOf/fifth fifth_dayof
if (! wide_tvb) {
return offset;
}
string = tvb_get_ephemeral_unicode_string (wide_tvb, 0, tvb_length(wide_tvb), ENC_BIG_ENDIAN);
string = tvb_get_unicode_string (wmem_packet_scope(), wide_tvb, 0, tvb_length(wide_tvb), ENC_BIG_ENDIAN);
proto_item_append_text(actx->created_item, " %s", string);
#.END

View File

@ -577,8 +577,8 @@ the buffer.
If you're fetching into such a chunk of memory a 2-byte Unicode string
from the buffer, and the string has a specified size, you can use
"tvb_get_ephemeral_faked_unicode()", which will check whether the entire
string is present before allocating a buffer for the string, and will also
"tvb_get_faked_unicode()", which will check whether the entire string
is present before allocating a buffer for the string, and will also
put a trailing '\0' at the end of the buffer. The resulting string will be
a sequence of single-byte characters; the only Unicode characters that
will be handled correctly are those in the ASCII range. (Wireshark's

View File

@ -251,42 +251,24 @@ void tvb_get_guid(tvbuff_t *tvb, const gint offset, e_guid_t *guid, const guint
String accessors:
guint8 *tvb_get_string(tvbuff_t *tvb, const gint offset, const gint length);
gchar *tvb_get_unicode_string(tvbuff_t *tvb, const gint offset, gint length, const guint encoding);
guint8 *tvb_get_ephemeral_string(tvbuff_t *tvb, const gint offset, const gint length);
guint8 *tvb_get_ephemeral_string_enc(tvbuff_t *tvb, const gint offset, const gint length, const guint encoding);
gchar *tvb_get_ephemeral_unicode_string(tvbuff_t *tvb, const gint offset, gint length, const guint encoding);
guint8 *tvb_get_seasonal_string(tvbuff_t *tvb, const gint offset, const gint length);
guint8 *tvb_get_string(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset, const gint length);
gchar *tvb_get_unicode_string(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset, gint length, const guint encoding);
guint8 *tvb_get_string_enc(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset, const gint length, const guint encoding);
Returns a null-terminated buffer containing data from the specified
tvbuff, starting at the specified offset, and containing the specified
length worth of characters (the length of the buffer will be length+1,
as it includes a null character to terminate the string).
tvb_get_string() returns a buffer allocated by g_malloc() so you must
g_free() it when you are finished with the string. Failure to g_free() this
buffer will lead to memory leaks.
tvb_get_string() returns a buffer allocated by g_malloc() if scope is set
to NULL (in that case memory must be explicitely freed), or with the
allocator lifetime if scope is not NULL.
tvb_get_unicode_string() is a unicode (UTF-16) version of above. This
is intended for reading UTF-16 unicode strings out of a tvbuff and
returning them as a UTF-8 string for use in Wireshark. The offset and
returned length pointer are in bytes, not UTF-16 characters.
tvb_get_ephemeral_string() returns a buffer allocated from a special heap
with a lifetime until the next packet is dissected. You do not need to
free() this buffer, it will happen automatically once the next packet is
dissected.
tvb_get_ephemeral_unicode_string() is a unicode (UTF-16) version of above.
This is intended for reading UTF-16 unicode strings out of a tvbuff and
returning them as a UTF-8 string for use in Wireshark. The offset and
returned length pointer are in bytes, not UTF-16 characters.
tvb_get_seasonal_string() returns a buffer allocated from a special heap
with a lifetime of the current capture session. You do not need to
free() this buffer, it will happen automatically once the a new capture or
file is opened.
guint8 *tvb_get_stringz(tvbuff_t *tvb, const gint offset, gint *lengthp);
guint8 *tvb_get_stringz_enc(tvbuff_t *tvb, const gint offset, gint *lengthp, const guint encoding);
const guint8 *tvb_get_const stringz(tvbuff_t *tvb, const gint offset, gint *lengthp);
@ -327,13 +309,9 @@ with a lifetime of the current capture session. You do not need to
free() this buffer, it will happen automatically once the a new capture or
file is opened.
tvb_fake_unicode() has been superseded by tvb_get_unicode_string(), which
tvb_get_faked_unicode() has been superseded by tvb_get_string(), which
properly handles Unicode (UTF-16) strings by converting them to UTF-8.
tvb_get_ephemeral_faked_unicode() has been superseded by
tvb_get_ephemeral_string(), which properly handles Unicode (UTF-16) strings by
converting them to UTF-8.
Byte Array Accessors:
gchar *tvb_bytes_to_str(tvbuff_t *tvb, gint offset, gint len);
@ -366,13 +344,9 @@ guint8* tvb_memcpy(tvbuff_t *tvb, guint8* target, gint offset, gint length);
Copies into the specified target the specified length's worth of data
from the specified tvbuff, starting at the specified offset.
guint8* tvb_memdup(tvbuff_t *tvb, gint offset, gint length);
guint8* ep_tvb_memdup(tvbuff_t *tvb, gint offset, gint length);
guint8* tvb_memdup(wmem_allocator_t *scope, tvbuff_t *tvb, gint offset, gint length);
Returns a buffer, allocated with "g_malloc()", containing the specified
length's worth of data from the specified tvbuff, starting at the
specified offset. The ephemeral variant is freed automatically after the
packet is dissected.
Returns a buffer, allocated with "g_malloc()" if scope is NULL, or with the specified pool.
Pointer-retrieval:
/* WARNING! Don't use this function. There is almost always a better way.

View File

@ -211,7 +211,7 @@ dissect_mp4_box(guint32 parent_box_type _U_,
return -1;
box_type = tvb_get_ntohl(tvb, offset+4);
box_type_str = tvb_get_ephemeral_string(tvb, offset+4, 4);
box_type_str = tvb_get_string(wmem_packet_scope(), tvb, offset+4, 4);
type_pi = proto_tree_add_text(tree, tvb, offset, -1, "%s (%s)",
val_to_str_const(box_type, box_types, "unknown"), box_type_str);

View File

@ -1273,7 +1273,7 @@ static int dissect_9P(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
proto_tree_add_item(sub_tree, hf_9P_parmsz, tvb, offset, 2, ENC_LITTLE_ENDIAN);
if (firstpass) {
tvb_s = tvb_get_g_string(tvb, offset+2, _9p_len);
tvb_s = tvb_get_string(NULL, tvb, offset+2, _9p_len);
if (!strncmp(tvb_s, "9P2000.L", _9p_len)) {
u32 = _9P2000_L;
@ -1363,7 +1363,7 @@ static int dissect_9P(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
sub_tree = proto_item_add_subtree(ti, ett_9P_aname);
proto_tree_add_item(sub_tree, hf_9P_parmsz, tvb, offset, 2, ENC_LITTLE_ENDIAN);
if(firstpass) {
tvb_s = tvb_get_g_string(tvb, offset+2, _9p_len);
tvb_s = tvb_get_string(NULL, tvb, offset+2, _9p_len);
conv_set_fid(pinfo, fid, tvb_s, _9p_len+1);
g_free(tvb_s);
}
@ -1409,7 +1409,7 @@ static int dissect_9P(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
}
if (firstpass) {
tvb_s = tvb_get_g_string(tvb, offset+2, _9p_len);
tvb_s = tvb_get_string(NULL, tvb, offset+2, _9p_len);
wmem_strbuf_append_c(tmppath, '/');
wmem_strbuf_append(tmppath, tvb_s);
g_free(tvb_s);
@ -1484,7 +1484,7 @@ static int dissect_9P(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
tmppath = wmem_strbuf_sized_new(wmem_packet_scope(), 0, MAXPATHLEN);
wmem_strbuf_append(tmppath, fid_path);
wmem_strbuf_append_c(tmppath, '/');
tvb_s = tvb_get_g_string(tvb, offset+2, _9p_len);
tvb_s = tvb_get_string(NULL, tvb, offset+2, _9p_len);
wmem_strbuf_append(tmppath, tvb_s);
g_free(tvb_s);
}
@ -1519,7 +1519,7 @@ static int dissect_9P(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
tmppath = wmem_strbuf_sized_new(wmem_packet_scope(), 0, MAXPATHLEN);
wmem_strbuf_append(tmppath, fid_path);
wmem_strbuf_append_c(tmppath, '/');
tvb_s = tvb_get_g_string(tvb, offset+2, _9p_len);
tvb_s = tvb_get_string(NULL, tvb, offset+2, _9p_len);
wmem_strbuf_append(tmppath, tvb_s);
g_free(tvb_s);
}
@ -1935,7 +1935,7 @@ static int dissect_9P(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
wmem_strbuf_append(tmppath, conv_get_fid(pinfo, dfid));
wmem_strbuf_append_c(tmppath, '/');
tvb_s = tvb_get_g_string(tvb, offset+2, _9p_len);
tvb_s = tvb_get_string(NULL, tvb, offset+2, _9p_len);
wmem_strbuf_append(tmppath, tvb_s);
g_free(tvb_s);

View File

@ -217,7 +217,7 @@ dissect_a_binary_command(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
proto_tree_add_item(subtree, hf_a_length, tvb, 4, 1, ENC_NA);
proto_tree_add_item(subtree, hf_a_text, tvb, 5, -1, ENC_ASCII|ENC_NA);
pstr = tvb_get_ephemeral_string(tvb, 5, tvb_get_guint8(tvb, 4));
pstr = tvb_get_string(wmem_packet_scope(), tvb, 5, tvb_get_guint8(tvb, 4));
if(pstr)
{
proto_item_append_text(ti, ": '%s'", pstr);
@ -283,7 +283,7 @@ dissect_a_binary_command(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
ti = proto_tree_add_item(subtree, hf_a_item, tvb, i, len+2, ENC_NA);
infotree = proto_item_add_subtree(ti, ett_a_item);
proto_tree_add_item(infotree, hf_a_weekday, tvb, i+2, len, ENC_ASCII|ENC_NA);
pstr = tvb_get_ephemeral_string(tvb, i+2, len);
pstr = tvb_get_string(wmem_packet_scope(), tvb, i+2, len);
if(pstr)
proto_item_append_text(ti, ", Weekday: '%s'", pstr);
@ -296,7 +296,7 @@ dissect_a_binary_command(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
ti = proto_tree_add_item(subtree, hf_a_item, tvb, i, len+2, ENC_NA);
infotree = proto_item_add_subtree(ti, ett_a_item);
proto_tree_add_item(infotree, hf_a_month_name, tvb, i+2, len, ENC_ASCII|ENC_NA);
pstr = tvb_get_ephemeral_string(tvb, i+2, len);
pstr = tvb_get_string(wmem_packet_scope(), tvb, i+2, len);
if(pstr)
proto_item_append_text(ti, ", Month name: '%s'", pstr);
i += len +2;
@ -308,7 +308,7 @@ dissect_a_binary_command(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
ti = proto_tree_add_item(subtree, hf_a_item, tvb, i, len+2, ENC_NA);
infotree = proto_item_add_subtree(ti, ett_a_item);
proto_tree_add_item(infotree, hf_a_weekofyear_prefix, tvb, i+2, len, ENC_ASCII|ENC_NA);
pstr = tvb_get_ephemeral_string(tvb, i+2, len);
pstr = tvb_get_string(wmem_packet_scope(), tvb, i+2, len);
if(pstr)
proto_item_append_text(ti, ", Week of the year prefix: '%s'", pstr);
i += len +2;
@ -355,7 +355,7 @@ dissect_a_binary_command(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
proto_tree_add_item(subtree, hf_a_length, tvb, 2, 1, ENC_NA);
proto_tree_add_item(subtree, hf_a_cdpn, tvb, 3, -1, ENC_ASCII|ENC_NA);
pstr = tvb_get_ephemeral_string(tvb, 3, tvb_get_guint8(tvb, 2));
pstr = tvb_get_string(wmem_packet_scope(), tvb, 3, tvb_get_guint8(tvb, 2));
if(pstr)
proto_item_append_text(ti, ": '%s'", pstr);
}

View File

@ -218,13 +218,13 @@ dissect_UDPExtStatus(tvbuff_t *tvb, proto_tree *adwin_tree)
/* add the processor type raw values to the tree, to allow filtering */
ADWIN_ADD_LE(adwin_tree, processor_type, 64, 2);
/* add the processor type as a pretty printed string */
processor_type = tvb_get_ephemeral_string(tvb, 64, 2);
processor_type = tvb_get_string(wmem_packet_scope(), tvb, 64, 2);
processor_type = str_to_str(processor_type, processor_type_mapping, "Unknown (%s)");
proto_tree_add_text(adwin_tree, tvb, 64, 2, "Processor Type: %s", processor_type);
/* add system type as raw value and pretty printed string */
ADWIN_ADD_LE(adwin_tree, system_type, 66, 2);
system_type = tvb_get_ephemeral_string(tvb, 66, 2);
system_type = tvb_get_string(wmem_packet_scope(), tvb, 66, 2);
system_type = str_to_str(system_type, system_type_mapping, "Unknown (%s)");
proto_tree_add_text(adwin_tree, tvb, 66, 2, "System Type: %s", system_type);
@ -261,13 +261,13 @@ dissect_UDPMessage(tvbuff_t *tvb, proto_tree *adwin_tree)
/* add the processor type raw values to the tree, to allow filtering */
ADWIN_ADD_LE(adwin_tree, processor_type, 96, 2);
/* add the processor type as a pretty printed string */
processor_type = tvb_get_ephemeral_string(tvb, 96, 2);
processor_type = tvb_get_string(wmem_packet_scope(), tvb, 96, 2);
processor_type = str_to_str(processor_type, processor_type_mapping, "Unknown");
proto_tree_add_text(adwin_tree, tvb, 96, 2, "Processor Type: %s", processor_type);
/* add system type as raw value and pretty printed string */
ADWIN_ADD_LE(adwin_tree, system_type, 98, 2);
system_type = tvb_get_ephemeral_string(tvb, 98, 2);
system_type = tvb_get_string(wmem_packet_scope(), tvb, 98, 2);
system_type = str_to_str(system_type, system_type_mapping, "Unknown");
proto_tree_add_text(adwin_tree, tvb, 98, 2, "System Type: %s", system_type);
}
@ -341,7 +341,7 @@ dissect_TCPFlashUpdate(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *adwin
ADWIN_ADD_BE(adwin_tree, stream_length, 0, 4);
offset = 4;
length = tvb_strnlen(tvb, offset, -1) + 1;
filename = tvb_get_ephemeral_string(tvb, offset, length);
filename = tvb_get_string(wmem_packet_scope(), tvb, offset, length);
if (strncmp(filename, "eeprom_on", length) == 0) {
proto_tree_add_text(adwin_tree, tvb, offset, length,
"Enable EEPROM Support");

View File

@ -1714,7 +1714,7 @@ name_in_bitmap(tvbuff_t *tvb, gint offset, guint16 bitmap, int isdir)
tp_ofs = nameoff +org_offset;
len = tvb_get_guint8(tvb, tp_ofs);
tp_ofs++;
name = tvb_get_ephemeral_string(tvb, tp_ofs, len);
name = tvb_get_string(wmem_packet_scope(), tvb, tp_ofs, len);
return name;
}
offset += 2;
@ -1752,7 +1752,7 @@ name_in_bitmap(tvbuff_t *tvb, gint offset, guint16 bitmap, int isdir)
tp_ofs = nameoff +org_offset +4;
len16 = tvb_get_ntohs(tvb, tp_ofs);
tp_ofs += 2;
name = tvb_get_ephemeral_string(tvb, tp_ofs, len16);
name = tvb_get_string(wmem_packet_scope(), tvb, tp_ofs, len16);
return name;
}
}
@ -2520,7 +2520,7 @@ dissect_query_afp_login(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
proto_tree_add_item(tree, hf_afp_Version, tvb, offset, 1, ENC_UTF_8|ENC_BIG_ENDIAN);
offset += len +1;
len_uam = tvb_get_guint8(tvb, offset);
uam = tvb_get_ephemeral_string(tvb, offset +1, len_uam);
uam = tvb_get_string(wmem_packet_scope(), tvb, offset +1, len_uam);
proto_tree_add_item(tree, hf_afp_UAM, tvb, offset, 1, ENC_UTF_8|ENC_BIG_ENDIAN);
offset += len_uam +1;
@ -2553,7 +2553,7 @@ dissect_query_afp_login_ext(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t
offset += len +1;
len_uam = tvb_get_guint8(tvb, offset);
uam = tvb_get_ephemeral_string(tvb, offset +1, len_uam);
uam = tvb_get_string(wmem_packet_scope(), tvb, offset +1, len_uam);
proto_tree_add_item(tree, hf_afp_UAM, tvb, offset, 1, ENC_UTF_8|ENC_BIG_ENDIAN);
offset += len_uam +1;
@ -4252,7 +4252,7 @@ spotlight_dissect_query_loop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
"%s, toc index: %u, string: '%s'",
spotlight_get_cpx_qtype_string(complex_query_type),
toc_index + 1,
tvb_get_ephemeral_string(tvb, offset + 16, query_length - 8));
tvb_get_string(wmem_packet_scope(), tvb, offset + 16, query_length - 8));
break;
case SQ_CPX_TYPE_UTF16_STRING:
/*
@ -4274,7 +4274,7 @@ spotlight_dissect_query_loop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
"%s, toc index: %u, utf-16 string: '%s'",
spotlight_get_cpx_qtype_string(complex_query_type),
toc_index + 1,
tvb_get_ephemeral_unicode_string(tvb, offset + (mark_exists ? 18 : 16),
tvb_get_unicode_string(wmem_packet_scope(), tvb, offset + (mark_exists ? 18 : 16),
query_length - (mark_exists? 10 : 8), unicode_encoding));
break;
default:
@ -4342,7 +4342,7 @@ spotlight_dissect_query_loop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
switch (cpx_query_type) {
case SQ_CPX_TYPE_STRING:
proto_tree_add_text(tree, tvb, offset, query_length, "string: '%s'",
tvb_get_ephemeral_string(tvb, offset + 8, query_length - 8));
tvb_get_string(wmem_packet_scope(), tvb, offset + 8, query_length - 8));
break;
case SQ_CPX_TYPE_UTF16_STRING: {
/* description see above */
@ -4351,7 +4351,7 @@ spotlight_dissect_query_loop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
unicode_encoding &= ~ENC_UTF_16;
proto_tree_add_text(tree, tvb, offset, query_length, "utf-16 string: '%s'",
tvb_get_ephemeral_unicode_string(tvb, offset + (mark_exists ? 10 : 8),
tvb_get_unicode_string(wmem_packet_scope(), tvb, offset + (mark_exists ? 10 : 8),
query_length - (mark_exists? 10 : 8), unicode_encoding));
break;
}
@ -4412,7 +4412,7 @@ dissect_spotlight(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offs
proto_item *item_toc;
proto_tree *sub_tree_toc;
if (strncmp(tvb_get_ephemeral_string(tvb, offset, 8), "md031234", 8) == 0)
if (strncmp(tvb_get_string(wmem_packet_scope(), tvb, offset, 8), "md031234", 8) == 0)
encoding = ENC_BIG_ENDIAN;
else
encoding = ENC_LITTLE_ENDIAN;

View File

@ -507,7 +507,7 @@ dissect_aim_rendezvous_extended_message(tvbuff_t *tvb, proto_tree *msg_tree)
proto_tree_add_item(msg_tree, hf_aim_rendezvous_extended_data_message_priority_code, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
text_length = tvb_get_letohs(tvb, offset);
proto_tree_add_item(msg_tree, hf_aim_rendezvous_extended_data_message_text_length, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
text = tvb_get_ephemeral_string(tvb, offset, text_length);
text = tvb_get_string(wmem_packet_scope(), tvb, offset, text_length);
proto_tree_add_text(msg_tree, tvb, offset, text_length, "Text: %s", text); /* offset+=text_length; */
offset = tvb_length(tvb);

View File

@ -1167,7 +1167,7 @@ dissect_aim_tlv_value_string (proto_item *ti, guint16 valueid _U_, tvbuff_t *tvb
gint string_len;
string_len = tvb_length(tvb);
buf = tvb_get_ephemeral_string(tvb, 0, string_len);
buf = tvb_get_string(wmem_packet_scope(), tvb, 0, string_len);
proto_item_set_text(ti, "Value: %s", format_text(buf, string_len));
return string_len;
@ -1184,7 +1184,7 @@ dissect_aim_tlv_value_string08_array (proto_item *ti, guint16 valueid _U_, tvbuf
while (tvb_reported_length_remaining(tvb, offset) > 1)
{
guint8 string_len = tvb_get_guint8(tvb, offset++);
guint8 *buf = tvb_get_ephemeral_string(tvb, offset, string_len);
guint8 *buf = tvb_get_string(wmem_packet_scope(), tvb, offset, string_len);
proto_tree_add_text(entry, tvb, offset, string_len, "%s",
format_text(buf, string_len));
offset += string_len;
@ -1289,7 +1289,7 @@ dissect_aim_tlv_value_messageblock (proto_item *ti, guint16 valueid _U_, tvbuff_
offset += 2;
/* The actual message */
buf = tvb_get_ephemeral_string(tvb, offset, blocklen - 4);
buf = tvb_get_string(wmem_packet_scope(), tvb, offset, blocklen - 4);
proto_item_append_text(ti, "Message: %s ",
format_text(buf, blocklen - 4));
proto_tree_add_item(entry, hf_aim_messageblock_message, tvb,

View File

@ -544,7 +544,7 @@ static const gchar* dissect_fields_desea(packet_info* pinfo _U_, tvbuff_t *tvb,
e164->e164_number_type = CALLED_PARTY_NUMBER;
e164->nature_of_address = tvb_get_guint8(tvb,offset) & 0x7f;
e164->E164_number_str = (gchar*)tvb_get_ephemeral_string(tvb,offset+1,len);
e164->E164_number_str = (gchar*)tvb_get_string(wmem_packet_scope(),tvb,offset+1,len);
e164->E164_number_length = len-1;
dissect_e164_number(tvb, tree, offset-1, len, *e164);
@ -570,7 +570,7 @@ static const gchar* dissect_fields_oesea(packet_info* pinfo _U_, tvbuff_t *tvb,
e164->e164_number_type = CALLING_PARTY_NUMBER;
e164->nature_of_address = tvb_get_guint8(tvb,offset) & 0x7f;
e164->E164_number_str = (gchar*)tvb_get_ephemeral_string(tvb,offset+1,len);
e164->E164_number_str = (gchar*)tvb_get_string(wmem_packet_scope(),tvb,offset+1,len);
e164->E164_number_length = len-1;
dissect_e164_number(tvb, tree, offset-1, len, *e164);

View File

@ -1960,7 +1960,7 @@ dissect_amqp_0_9_field_table(tvbuff_t *tvb, packet_info *pinfo, int offset, guin
length -= 1;
if (length < namelen)
goto too_short;
name = (char*) tvb_get_ephemeral_string(tvb, offset, namelen);
name = (char*) tvb_get_string(wmem_packet_scope(), tvb, offset, namelen);
offset += namelen;
length -= namelen;
if (length < 1)
@ -1978,7 +1978,7 @@ dissect_amqp_0_9_field_table(tvbuff_t *tvb, packet_info *pinfo, int offset, guin
length -= 4;
if (length < vallen)
goto too_short;
value = (char*) tvb_get_ephemeral_string(tvb, offset, vallen);
value = (char*) tvb_get_string(wmem_packet_scope(), tvb, offset, vallen);
offset += vallen;
length -= vallen;
break;
@ -2092,7 +2092,7 @@ dissect_amqp_0_10_map(tvbuff_t *tvb,
namelen = tvb_get_guint8(tvb, offset);
AMQP_INCREMENT(offset, 1, bound);
length -= 1;
name = (char*) tvb_get_ephemeral_string(tvb, offset, namelen);
name = (char*) tvb_get_string(wmem_packet_scope(), tvb, offset, namelen);
AMQP_INCREMENT(offset, namelen, bound);
length -= namelen;
type = tvb_get_guint8(tvb, offset);
@ -2209,7 +2209,7 @@ dissect_amqp_0_10_array(tvbuff_t *tvb,
len16 = tvb_get_ntohs(tvb, offset);
AMQP_INCREMENT(offset, 2, bound);
length -= 2;
value = (char*) tvb_get_ephemeral_string(tvb, offset, len16);
value = (char*) tvb_get_string(wmem_packet_scope(), tvb, offset, len16);
AMQP_INCREMENT(offset, len16, bound);
length -= len16;
break;
@ -8627,7 +8627,7 @@ format_amqp_0_10_str(tvbuff_t *tvb,
return length;
}
AMQP_INCREMENT(offset, length, bound);
*value = tvb_get_ephemeral_string(tvb, offset, string_length);
*value = tvb_get_string(wmem_packet_scope(), tvb, offset, string_length);
AMQP_INCREMENT(offset, string_length, bound);
return (string_length + length);
}

View File

@ -1969,7 +1969,7 @@ elem_mid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset
a_bigbuf[0] = Dgt_meid.out[(oct & 0xf0) >> 4];
curr_offset++;
poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
poctets = tvb_get_string(wmem_packet_scope(), tvb, curr_offset, len - (curr_offset - offset));
my_dgt_tbcd_unpack(&a_bigbuf[1], poctets, len - (curr_offset - offset),
&Dgt_meid);
@ -2176,7 +2176,7 @@ elem_mid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset
a_bigbuf[0] = Dgt_msid.out[(oct & 0xf0) >> 4];
curr_offset++;
poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
poctets = tvb_get_string(wmem_packet_scope(), tvb, curr_offset, len - (curr_offset - offset));
my_dgt_tbcd_unpack(&a_bigbuf[1], poctets, len - (curr_offset - offset),
&Dgt_msid);
@ -3778,7 +3778,7 @@ elem_clg_party_ascii_num(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
curr_offset++;
}
poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
poctets = tvb_get_string(wmem_packet_scope(), tvb, curr_offset, len - (curr_offset - offset));
proto_tree_add_string_format(tree, hf_ansi_a_clg_party_ascii_num,
tvb, curr_offset, len - (curr_offset - offset),
@ -4321,7 +4321,7 @@ elem_cld_party_bcd_num(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
curr_offset++;
poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
poctets = tvb_get_string(wmem_packet_scope(), tvb, curr_offset, len - (curr_offset - offset));
my_dgt_tbcd_unpack(a_bigbuf, poctets, len - (curr_offset - offset),
&Dgt_tbcd);
@ -4458,7 +4458,7 @@ elem_clg_party_bcd_num(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
curr_offset++;
}
poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
poctets = tvb_get_string(wmem_packet_scope(), tvb, curr_offset, len - (curr_offset - offset));
my_dgt_tbcd_unpack(a_bigbuf, poctets, len - (curr_offset - offset),
&Dgt_tbcd);
@ -6704,7 +6704,7 @@ elem_rev_ms_info_recs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, g
switch (rec_type)
{
case ANSI_REV_MS_INFO_REC_KEYPAD_FAC:
poctets = tvb_get_ephemeral_string(tvb, curr_offset, oct_len);
poctets = tvb_get_string(wmem_packet_scope(), tvb, curr_offset, oct_len);
proto_tree_add_string_format(subtree, hf_ansi_a_cld_party_ascii_num,
tvb, curr_offset, oct_len,
@ -7528,7 +7528,7 @@ elem_cld_party_ascii_num(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
curr_offset++;
poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
poctets = tvb_get_string(wmem_packet_scope(), tvb, curr_offset, len - (curr_offset - offset));
proto_tree_add_string_format(tree, hf_ansi_a_cld_party_ascii_num,
tvb, curr_offset, len - (curr_offset - offset),
@ -12064,7 +12064,7 @@ dissect_sip_dtap_bsmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (linelen >= 2) {
ansi_a_tvb = tvb_new_composite();
msg_type = (guint8*)wmem_alloc(pinfo->pool, 1);
msg_type[0] = (guint8)strtoul(tvb_get_ephemeral_string(tvb, offset, 2), NULL, 16);
msg_type[0] = (guint8)strtoul(tvb_get_string(wmem_packet_scope(), tvb, offset, 2), NULL, 16);
if ((begin = tvb_find_guint8(tvb, offset, linelen, '"')) > 0) {
if (tvb_get_guint8(tvb, begin + 1) == '1') {
is_dtap = FALSE;
@ -12079,7 +12079,7 @@ dissect_sip_dtap_bsmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
while ((linelen = tvb_find_line_end(tvb, offset, -1, &next_offset, TRUE)) > 0) {
if ((begin = tvb_find_guint8(tvb, offset, linelen, '=')) > 0) {
begin++;
tvb_composite_append(ansi_a_tvb, base64_to_tvb(tvb, tvb_get_ephemeral_string(tvb, begin, offset + linelen - begin)));
tvb_composite_append(ansi_a_tvb, base64_to_tvb(tvb, tvb_get_string(wmem_packet_scope(), tvb, begin, offset + linelen - begin)));
}
offset = next_offset;
}

View File

@ -1493,7 +1493,7 @@ dissect_ansi_map_digits_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
return;
offset++;
proto_tree_add_item(subtree, hf_ansi_map_ia5_digits, tvb, offset, -1, ENC_ASCII|ENC_NA);
proto_item_append_text(actx->created_item, " - %s", tvb_get_ephemeral_string(tvb,offset,tvb_length_remaining(tvb,offset)));
proto_item_append_text(actx->created_item, " - %s", tvb_get_string(wmem_packet_scope(),tvb,offset,tvb_length_remaining(tvb,offset)));
break;
case 3:
/* Octet string */
@ -1526,7 +1526,7 @@ dissect_ansi_map_digits_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
case 2:
/* IA5 Coding */
proto_tree_add_item(subtree, hf_ansi_map_ia5_digits, tvb, offset, -1, ENC_ASCII|ENC_NA);
proto_item_append_text(actx->created_item, " - %s", tvb_get_ephemeral_string(tvb,offset,tvb_length_remaining(tvb,offset)));
proto_item_append_text(actx->created_item, " - %s", tvb_get_string(wmem_packet_scope(),tvb,offset,tvb_length_remaining(tvb,offset)));
break;
case 3:
/* Octet string */

View File

@ -170,7 +170,7 @@ dissect_applemidi_common( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
/* Name is optional */
if ( len > 0 ) {
name = tvb_get_ephemeral_string( tvb, offset, len );
name = tvb_get_string( wmem_packet_scope(), tvb, offset, len );
string_size = (gint)( strlen( name ) + 1 );
proto_tree_add_item( applemidi_tree, hf_applemidi_name, tvb, offset, string_size, ENC_UTF_8|ENC_NA );
col_append_fstr( pinfo->cinfo, COL_INFO, ": peer = \"%s\"", name );

View File

@ -997,7 +997,7 @@ dissect_aprs_weather( tvbuff_t *tvb,
lr = new_offset - offset;
#if 0 /* fcn'al change: defer */
if ( ((lr < 3) || (lr > 5)) ||
( lr != strspn( tvb_get_ephemeral_string( tvb, offset, lr ), "a-zA-Z0-9-_" ) ) )
( lr != strspn( tvb_get_string( wmem_packet_scope(), tvb, offset, lr ), "a-zA-Z0-9-_" ) ) )
{
new_offset = offset; /* Assume rest is a comment: force exit from while */
break; /* from switch */
@ -1129,7 +1129,7 @@ aprs_item( proto_tree *aprs_tree, tvbuff_t *tvb, int offset )
data_len = 10;
info_buffer = tvb_get_ephemeral_string( tvb, offset, data_len );
info_buffer = tvb_get_string( wmem_packet_scope(), tvb, offset, data_len );
ch_ptr = strchr( info_buffer, '!' );
if ( ch_ptr != NULL )

View File

@ -129,7 +129,7 @@ dissect_ar_drone(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
return 0;
/* Make sure the packet we're dissecting is a ar_drone packet */
if(strcmp(tvb_get_ephemeral_string(tvb,0,3),"AT*"))
if(strcmp(tvb_get_string(wmem_packet_scope(),tvb,0,3),"AT*"))
return 0;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ar_drone");
@ -146,9 +146,9 @@ dissect_ar_drone(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
if (offset < master_offset)
return master_offset;
command = tvb_get_ephemeral_string(tvb, master_offset, offset-master_offset);
command = tvb_get_string(wmem_packet_scope(), tvb, master_offset, offset-master_offset);
sub_item = proto_tree_add_string(ar_tree, hf_command, tvb, master_offset, -1,
tvb_get_ephemeral_string(tvb, master_offset+3, offset-master_offset-3));
tvb_get_string(wmem_packet_scope(), tvb, master_offset+3, offset-master_offset-3));
if(!strncmp(command,"AT*PCMD",7))
{
@ -541,7 +541,7 @@ dissect_ar_drone(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
}
ti = proto_tree_add_item(sub_tree, hf_CTRL_mode, tvb, offset, length, ENC_ASCII|ENC_NA);
proto_item_append_text(ti, "%s",
str_to_str(tvb_get_ephemeral_string(tvb, offset, length), CTRL_mode_vs, " (Unknown Mode)"));
str_to_str(tvb_get_string(wmem_packet_scope(), tvb, offset, length), CTRL_mode_vs, " (Unknown Mode)"));
offset += (length + 1);
/* Add File Size */

View File

@ -2456,7 +2456,7 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
}
col_append_fstr(pinfo->cinfo, COL_INFO, "%s",
tvb_get_ephemeral_string(tvb, offset, 8));
tvb_get_string(wmem_packet_scope(), tvb, offset, 8));
if (tree) {
proto_tree_add_item(artnet_header_tree, hf_artnet_header_id,
tvb, offset, 8, ENC_ASCII|ENC_NA);

View File

@ -491,7 +491,7 @@ dissect_pool_handle_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tre
handle_length = tvb_get_ntohs(parameter_tvb, PARAMETER_LENGTH_OFFSET) - PARAMETER_HEADER_LENGTH;
pi = proto_tree_add_item(parameter_tree, hf_pool_handle, parameter_tvb, POOL_HANDLE_OFFSET, handle_length, ENC_NA);
tmp = (gchar*)tvb_get_ephemeral_string(parameter_tvb, POOL_HANDLE_OFFSET, handle_length);
tmp = (gchar*)tvb_get_string(wmem_packet_scope(), parameter_tvb, POOL_HANDLE_OFFSET, handle_length);
proto_item_append_text(pi, " (%s)", tmp);
}

View File

@ -3495,25 +3495,25 @@ dissect_serialnumber (tvbuff_t *tvb, guint32 start_offset, guint32 length _U_, p
sn_item = proto_tree_add_item (tree, hf_index, tvb, start_offset, 16, ENC_ASCII|ENC_NA);
sn_tree = proto_item_add_subtree (sn_item, ett_r3serialnumber);
s = tvb_get_ephemeral_string (tvb, start_offset + 0, 2);
s = tvb_get_string (wmem_packet_scope(), tvb, start_offset + 0, 2);
proto_tree_add_text (sn_tree, tvb, start_offset + 0, 2, "Manufacturer .. : %s (%s)", s, str_to_str (s, r3_snmanufacturernames, "[Unknown]"));
s = tvb_get_ephemeral_string (tvb, start_offset + 2, 1);
s = tvb_get_string (wmem_packet_scope(), tvb, start_offset + 2, 1);
proto_tree_add_text (sn_tree, tvb, start_offset + 2, 1, "Year .......... : %s (%s)", s, str_to_str (s, r3_snyearnames, "[Unknown]"));
s = tvb_get_ephemeral_string (tvb, start_offset + 3, 2);
s = tvb_get_string (wmem_packet_scope(), tvb, start_offset + 3, 2);
proto_tree_add_text (sn_tree, tvb, start_offset + 3, 2, "Week .......... : %s", s);
s = tvb_get_ephemeral_string (tvb, start_offset + 5, 1);
s = tvb_get_string (wmem_packet_scope(), tvb, start_offset + 5, 1);
proto_tree_add_text (sn_tree, tvb, start_offset + 5, 1, "Model ......... : %s (%s)", s, str_to_str (s, r3_snmodelnames, "[Unknown]"));
s = tvb_get_ephemeral_string (tvb, start_offset + 6, 4);
s = tvb_get_string (wmem_packet_scope(), tvb, start_offset + 6, 4);
proto_tree_add_text (sn_tree, tvb, start_offset + 6, 4, "Sequence ...... : %s", s);
s = tvb_get_ephemeral_string (tvb, start_offset + 10, 1);
s = tvb_get_string (wmem_packet_scope(), tvb, start_offset + 10, 1);
proto_tree_add_text (sn_tree, tvb, start_offset + 10, 1, "Group ......... : %s (%s)", s, str_to_str (s, r3_sngroupnames, "[Unknown]"));
s = tvb_get_ephemeral_string (tvb, start_offset + 11, 1);
s = tvb_get_string (wmem_packet_scope(), tvb, start_offset + 11, 1);
proto_tree_add_text (sn_tree, tvb, start_offset + 11, 1, "NID ........... : %s (%s)", s, str_to_str (s, r3_snnidnames, "[Unknown]"));
s = tvb_get_ephemeral_string (tvb, start_offset + 12, 2);
s = tvb_get_string (wmem_packet_scope(), tvb, start_offset + 12, 2);
proto_tree_add_text (sn_tree, tvb, start_offset + 12, 2, "HID ........... : %s (%s)", s, str_to_str (s, r3_snhidnames, "[Unknown]"));
s = tvb_get_ephemeral_string (tvb, start_offset + 14, 1);
s = tvb_get_string (wmem_packet_scope(), tvb, start_offset + 14, 1);
proto_tree_add_text (sn_tree, tvb, start_offset + 14, 1, "Power Supply .. : %s (%s)", s, str_to_str (s, r3_snpowersupplynames, "[Unknown]"));
s = tvb_get_ephemeral_string (tvb, start_offset + 15, 1);
s = tvb_get_string (wmem_packet_scope(), tvb, start_offset + 15, 1);
proto_tree_add_text (sn_tree, tvb, start_offset + 15, 1, "Mortise ....... : %s (%s)", s, str_to_str (s, r3_snmortisenames, "[Unknown]"));
}

View File

@ -572,7 +572,7 @@ static int dissect_pascal_string(tvbuff_t *tvb, int offset, proto_tree *tree,
* code, we could perhaps avoid allocating and freeing
* this string buffer.
*/
tmp = (gchar*)tvb_get_ephemeral_string(tvb, offset, len);
tmp = (gchar*)tvb_get_string(wmem_packet_scope(), tvb, offset, len);
item = proto_tree_add_string(tree, hf_index, tvb, offset-1, len+1, tmp);
subtree = proto_item_add_subtree(item, ett_pstring);
@ -1126,7 +1126,7 @@ dissect_asp_reply_get_status(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
break;
case 4: /* DNS */
if (len > 2) {
tmp = (gchar*)tvb_get_ephemeral_string(tvb, ofs +2, len -2);
tmp = (gchar*)tvb_get_string(wmem_packet_scope(), tvb, ofs +2, len -2);
ti = proto_tree_add_text(adr_tree, tvb, ofs, len, "dns %s", tmp);
break;
}
@ -1162,7 +1162,7 @@ dissect_asp_reply_get_status(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
ofs = utf_ofs;
ulen = tvb_get_ntohs(tvb, ofs);
tmp = (gchar*)tvb_get_ephemeral_string(tvb, ofs + 2, ulen);
tmp = (gchar*)tvb_get_string(wmem_packet_scope(), tvb, ofs + 2, ulen);
ti = proto_tree_add_text(tree, tvb, ofs, ulen +2, "UTF8 server name: %s", tmp);
sub_tree = proto_item_add_subtree(ti, ett_asp_utf8_name);
proto_tree_add_uint(sub_tree, hf_asp_server_utf8_name_len, tvb, ofs, 2, ulen);

View File

@ -6268,7 +6268,7 @@ fCharacterString (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
* other dissectors need to handle various
* character encodings.
*/
str_val = tvb_get_ephemeral_string(tvb, offset, l);
str_val = tvb_get_string(wmem_packet_scope(), tvb, offset, l);
/** this decoding may be not correct for multi-byte characters, Lka */
switch (character_set) {
case ANSI_X34:

View File

@ -4507,7 +4507,7 @@ dissect_ber_GeneralizedTime(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree
return end_offset;
}
tmpstr = tvb_get_ephemeral_string(tvb, offset, len);
tmpstr = tvb_get_string(wmem_packet_scope(), tvb, offset, len);
strptr = str;
/* those fields are allways present */
strptr += g_snprintf(str, 20, "%.4s-%.2s-%.2s %.2s:%.2s:%.2s",
@ -4616,11 +4616,11 @@ dissect_ber_UTCTime(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, t
if ((len < 10) || (len > 19)) {
error_str = wmem_strdup_printf(wmem_packet_scope(), "BER Error: UTCTime invalid length: %u", len);
instr = tvb_get_ephemeral_string(tvb, offset, len > 19 ? 19 : len);
instr = tvb_get_string(wmem_packet_scope(), tvb, offset, len > 19 ? 19 : len);
goto malformed;
}
instr = tvb_get_ephemeral_string(tvb, offset, len);
instr = tvb_get_string(wmem_packet_scope(), tvb, offset, len);
/* YYMMDDhhmm */
for (i=0; i<10; i++) {
@ -4818,7 +4818,7 @@ dissect_ber_constrained_bitstring(gboolean implicit_tag, asn1_ctx_t *actx, proto
sep = " (";
term = FALSE;
nb = named_bits;
bitstring = tvb_get_ephemeral_string(tvb, offset, len);
bitstring = tvb_get_string(wmem_packet_scope(), tvb, offset, len);
while (nb->p_id) {
if ((len > 0) && (nb->bit < (8*len-pad))) {

View File

@ -346,7 +346,7 @@ dissect_bfd_authentication(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
switch (auth_type) {
case BFD_AUTH_SIMPLE:
if (tree) {
password = tvb_get_ephemeral_string(tvb, offset+3, auth_len-3);
password = tvb_get_string(wmem_packet_scope(), tvb, offset+3, auth_len-3);
proto_tree_add_string(auth_tree, hf_bfd_auth_password, tvb, offset+3,
auth_len-3, password);
proto_item_append_text(auth_item, ": %s", password);

View File

@ -346,10 +346,10 @@ dissect_bencoding_str(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree_add_item(tree, hf_bittorrent_bstr, tvb, offset+used, stringlen, ENC_ASCII|ENC_NA);
if (treeadd==1) {
proto_item_append_text(ti, " Key: %s", format_text((guchar *)ep_tvb_memdup(tvb, offset+used, stringlen), stringlen));
proto_item_append_text(ti, " Key: %s", format_text((guchar *)tvb_memdup(wmem_packet_scope(), tvb, offset+used, stringlen), stringlen));
}
if (treeadd==2) {
proto_item_append_text(ti, " Value: %s", format_text((guchar *)ep_tvb_memdup(tvb, offset+used, stringlen), stringlen));
proto_item_append_text(ti, " Value: %s", format_text((guchar *)tvb_memdup(wmem_packet_scope(), tvb, offset+used, stringlen), stringlen));
}
}
return used+stringlen;
@ -780,8 +780,8 @@ dissect_bittorrent_welcome (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t
for(i = 0; peer_id[i].name != NULL; ++i)
{
if(tvb_memeql(tvb, offset, peer_id[i].id, (int)strlen(peer_id[i].id)) == 0) {
version = tvb_get_ephemeral_string(tvb, offset + (int)strlen(peer_id[i].id),
peer_id[i].ver_len);
version = tvb_get_string(wmem_packet_scope(), tvb, offset + (int)strlen(peer_id[i].id),
peer_id[i].ver_len);
proto_tree_add_text(tree, tvb, offset, 20, "Client is %s v%s",
peer_id[i].name,
format_text((guchar*)version, peer_id[i].ver_len));

View File

@ -103,7 +103,7 @@ dissect_bmc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
/* Needs bit-reversing. Create a new buffer, copy the message to it and bit-reverse */
len = tvb_length(tvb);
reversing_buffer = (guint8 *)tvb_g_memdup(tvb, offset, len);
reversing_buffer = (guint8 *)tvb_memdup(NULL, tvb, offset, len);
p_rev = reversing_buffer;
/* Entire message is bit reversed */
for (i=0; i<len; i++, p_rev++)

View File

@ -4327,7 +4327,7 @@ static void get_opt125_tlv(tvbuff_t *tvb, guint off, guint8 *tlvtype, guint8 *tl
/* Length */
*tlvlen = tvb_get_guint8(tvb, off+1);
/* Value */
*value = (guint8 *)ep_tvb_memdup(tvb, off + 2, *tlvlen);
*value = (guint8 *)tvb_memdup(wmem_packet_scope(), tvb, off + 2, *tlvlen);
}
static void get_opt60_tlv(tvbuff_t *tvb, guint off, guint8 *tlvtype, guint8 *tlvlen, guint8 **value)

View File

@ -104,7 +104,7 @@ bencoded_string_length(tvbuff_t *tvb, guint *offset_ptr)
while(tvb_get_guint8(tvb, offset) != ':')
++offset;
len = atoi(tvb_get_ephemeral_string(tvb, start, offset-start));
len = atoi(tvb_get_string(wmem_packet_scope(), tvb, start, offset-start));
++offset; /* skip the ':' */
*offset_ptr = offset;
@ -127,7 +127,7 @@ dissect_bencoded_string(tvbuff_t *tvb, packet_info _U_*pinfo, proto_tree *tree,
if( tohex )
*result = tvb_bytes_to_str(tvb, offset, string_len );
else
*result = tvb_get_ephemeral_string( tvb, offset, string_len );
*result = tvb_get_string( wmem_packet_scope(), tvb, offset, string_len );
proto_tree_add_string_format( tree, hf_bencoded_string, tvb, offset, string_len, *result, "%s: %s", label, *result );
offset += string_len;
@ -150,7 +150,7 @@ dissect_bencoded_int(tvbuff_t *tvb, packet_info _U_*pinfo, proto_tree *tree, gui
while( tvb_get_guint8(tvb,offset)!='e' )
offset += 1;
*result = tvb_get_ephemeral_string( tvb, start_offset, offset-start_offset);
*result = tvb_get_string( wmem_packet_scope(), tvb, start_offset, offset-start_offset);
proto_tree_add_string_format( tree, hf_bencoded_int, tvb, start_offset, offset-start_offset, *result,
"%s: %s", label, *result );

View File

@ -625,7 +625,7 @@ dissect_attribute_entries(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
for (i_entry = 0; i_entry < count; ++i_entry) {
attribute_id = tvb_get_ntohl(tvb, offset);
value_length = tvb_get_ntohs(tvb, offset + 4 + 2);
value = tvb_get_g_string(tvb, offset + 4 + 2 + 2, value_length);
value = tvb_get_string(NULL, tvb, offset + 4 + 2 + 2, value_length);
if (attribute_id == 0x01) col_append_fstr(pinfo->cinfo, COL_INFO, " - Title: \"%s\"", value);
@ -663,7 +663,7 @@ dissect_item_mediaplayer(tvbuff_t *tvb, proto_tree *tree, gint offset)
item_length = tvb_get_ntohs(tvb, offset + 1);
displayable_name_length = tvb_get_ntohs(tvb, offset + 1 + 2 + 1 + 1 + 4 + 16 + 1 + 2);
displayable_name = tvb_get_g_string(tvb, offset + 1 + 2 + 1 + 1 + 4 + 16 + 1 + 2 + 2, displayable_name_length);
displayable_name = tvb_get_string(NULL, tvb, offset + 1 + 2 + 1 + 1 + 4 + 16 + 1 + 2 + 2, displayable_name_length);
pitem = proto_tree_add_text(tree, tvb, offset, 1 + 2 + item_length, "Player: %s", displayable_name);
ptree = proto_item_add_subtree(pitem, ett_btavrcp_player);
@ -825,7 +825,7 @@ dissect_item_media_element(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
item_length = tvb_get_ntohs(tvb, offset + 1);
displayable_name_length = tvb_get_ntohs(tvb, offset + 1 + 2 + 8 + 1 + 2);
displayable_name = tvb_get_g_string(tvb, offset + 1 + 2 + 8 + 1 + 2 + 2, displayable_name_length);
displayable_name = tvb_get_string(NULL, tvb, offset + 1 + 2 + 8 + 1 + 2 + 2, displayable_name_length);
pitem = proto_tree_add_text(tree, tvb, offset, 1 + 2 + item_length, "Element: %s", displayable_name);
ptree = proto_item_add_subtree(pitem, ett_btavrcp_element);
@ -877,7 +877,7 @@ dissect_item_folder(tvbuff_t *tvb, proto_tree *tree, gint offset)
item_length = tvb_get_ntohs(tvb, offset + 1);
displayable_name_length = tvb_get_ntohs(tvb, offset + 1 + 2 + 8 + 1 + 1 + 2);
displayable_name = tvb_get_g_string(tvb, offset + 1 + 2 + 8 + 1 + 1 + 2 + 2, displayable_name_length);
displayable_name = tvb_get_string(NULL, tvb, offset + 1 + 2 + 8 + 1 + 1 + 2 + 2, displayable_name_length);
pitem = proto_tree_add_text(tree, tvb, offset, 1 + 2 + item_length, "Folder : %s", displayable_name);
ptree = proto_item_add_subtree(pitem, ett_btavrcp_folder);
@ -1903,7 +1903,7 @@ dissect_browsing(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
folder_name_length = tvb_get_ntohs(tvb, offset);
offset += 2;
proto_tree_add_item(ptree, hf_btavrcp_folder_name, tvb, offset, folder_name_length, ENC_NA);
folder_name = tvb_get_g_string(tvb, offset, folder_name_length);
folder_name = tvb_get_string(NULL, tvb, offset, folder_name_length);
offset += folder_name_length;
proto_item_append_text(pitem, "%s/", folder_name);
col_append_fstr(pinfo->cinfo, COL_INFO, "%s/", folder_name);

View File

@ -1383,7 +1383,7 @@ dissect_bthci_evt_remote_name_req_complete(tvbuff_t *tvb, int offset, packet_inf
gchar *name;
device_name_t *device_name;
name = tvb_get_ephemeral_string(tvb, offset, 248);
name = tvb_get_string(wmem_packet_scope(), tvb, offset, 248);
k_frame_number = pinfo->fd->num;
k_bd_addr_oui = bd_addr[0] << 16 | bd_addr[1] << 8 | bd_addr[2];
@ -1841,7 +1841,7 @@ dissect_bthci_evt_eir_ad_data(tvbuff_t *tvb, int offset, packet_info *pinfo,
gchar *name;
device_name_t *device_name;
name = tvb_get_ephemeral_string(tvb, offset+i+2, length-1);
name = tvb_get_string(wmem_packet_scope(), tvb, offset+i+2, length-1);
k_frame_number = pinfo->fd->num;
k_bd_addr_oui = bd_addr[0] << 16 | bd_addr[1] << 8 | bd_addr[2];
@ -2706,7 +2706,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, packet_info *pinfo
k_adapter_id = hci_data->adapter_id;
k_frame_number = pinfo->fd->num;
name = tvb_get_ephemeral_string(tvb, offset, 248);
name = tvb_get_string(wmem_packet_scope(), tvb, offset, 248);
key[0].length = 1;
key[0].key = &k_interface_id;

View File

@ -237,7 +237,7 @@ dissect_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
guint8 *id;
proto_tree_add_item(tree, hf_bthcrp_control_1284_id, tvb, offset, -1, ENC_ASCII | ENC_NA);
id = tvb_get_g_string(tvb, offset, tvb_length_remaining(tvb, offset));
id = tvb_get_string(NULL, tvb, offset, tvb_length_remaining(tvb, offset));
col_append_fstr(pinfo->cinfo, COL_INFO, " - 1284 ID: %s", id);
offset += tvb_length_remaining(tvb, offset);
}

View File

@ -1343,7 +1343,7 @@ dissect_bthfp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Detect reassemble end character: \r for HS or \n for AG */
length = tvb_length(tvb);
at_stream = tvb_get_ephemeral_string(tvb, 0, length);
at_stream = tvb_get_string(wmem_packet_scope(), tvb, 0, length);
reassemble_start_offset = 0;

View File

@ -1222,8 +1222,8 @@ dissect_headers(proto_tree *tree, tvbuff_t *tvb, int offset, packet_info *pinfo,
}
else if (is_ascii_str(tvb_get_ptr(tvb, offset,item_length - 3), item_length - 3))
{
proto_item_append_text(hdr_tree, " (\"%s\")", tvb_get_ephemeral_string(tvb, offset,item_length - 3));
col_append_fstr(pinfo->cinfo, COL_INFO, " \"%s\"", tvb_get_ephemeral_string(tvb, offset,item_length - 3));
proto_item_append_text(hdr_tree, " (\"%s\")", tvb_get_string(wmem_packet_scope(), tvb, offset,item_length - 3));
col_append_fstr(pinfo->cinfo, COL_INFO, " \"%s\"", tvb_get_string(wmem_packet_scope(), tvb, offset,item_length - 3));
}
if (item_length >= 3) /* prevent infinite loops */

View File

@ -2126,22 +2126,22 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
switch (attribute) {
case 0x300:
proto_tree_add_item(next_tree, hf_hcrp_1284_id, tvb, offset, size, ENC_ASCII | ENC_NA);
new_str = tvb_get_ephemeral_string(tvb, offset, size);
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
g_snprintf(str, MAX_SDP_LEN, "%s", new_str);
break;
case 0x302:
proto_tree_add_item(next_tree, hf_hcrp_device_name, tvb, offset, size, ENC_ASCII | ENC_NA);
new_str = tvb_get_ephemeral_string(tvb, offset, size);
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
g_snprintf(str, MAX_SDP_LEN, "%s", new_str);
break;
case 0x304:
proto_tree_add_item(next_tree, hf_hcrp_friendly_name, tvb, offset, size, ENC_ASCII | ENC_NA);
new_str = tvb_get_ephemeral_string(tvb, offset, size);
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
g_snprintf(str, MAX_SDP_LEN, "%s", new_str);
break;
case 0x306:
proto_tree_add_item(next_tree, hf_hcrp_device_location, tvb, offset, size, ENC_ASCII | ENC_NA);
new_str = tvb_get_ephemeral_string(tvb, offset, size);
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
g_snprintf(str, MAX_SDP_LEN, "%s", new_str);
break;
default:
@ -2163,7 +2163,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
break;
case 0x308:
proto_tree_add_item(next_tree, hf_wap_homepage_url, tvb, offset, size, ENC_ASCII | ENC_NA);
new_str = tvb_get_ephemeral_string(tvb, offset, size);
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
g_snprintf(str, MAX_SDP_LEN, "%s", new_str);
break;
case 0x309:
@ -2235,7 +2235,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
proto_item_set_len(entry_item, (new_offset - entry_offset) + length);
entry_offset = new_offset;
proto_tree_add_item(next_tree, hf_hdp_supported_features_mdep_description, tvb, entry_offset, length, ENC_ASCII | ENC_NA);
proto_item_append_text(entry_item, ": %s", tvb_get_ephemeral_string(tvb, entry_offset, length));
proto_item_append_text(entry_item, ": %s", tvb_get_string(wmem_packet_scope(), tvb, entry_offset, length));
entry_offset += length;
}
@ -2277,12 +2277,12 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
case 0x30D:
case 0x200:
proto_tree_add_item(next_tree, hf_pan_ipv4_subnet, tvb, offset, size, ENC_ASCII | ENC_NA);
new_str = tvb_get_ephemeral_string(tvb, offset, size);
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
g_snprintf(str, MAX_SDP_LEN, "%s", new_str);
break;
case 0x30E:
proto_tree_add_item(next_tree, hf_pan_ipv6_subnet, tvb, offset, size, ENC_ASCII | ENC_NA);
new_str = tvb_get_ephemeral_string(tvb, offset, size);
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
g_snprintf(str, MAX_SDP_LEN, "%s", new_str);
break;
default:
@ -2309,12 +2309,12 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
case 0x30D:
case 0x200:
proto_tree_add_item(next_tree, hf_pan_ipv4_subnet, tvb, offset, size, ENC_ASCII | ENC_NA);
new_str = tvb_get_ephemeral_string(tvb, offset, size);
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
g_snprintf(str, MAX_SDP_LEN, "%s", new_str);
break;
case 0x30E:
proto_tree_add_item(next_tree, hf_pan_ipv6_subnet, tvb, offset, size, ENC_ASCII | ENC_NA);
new_str = tvb_get_ephemeral_string(tvb, offset, size);
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
g_snprintf(str, MAX_SDP_LEN, "%s", new_str);
break;
default:
@ -2366,7 +2366,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
break;
case 0x306:
proto_tree_add_item(next_tree, hf_dun_escape_sequence, tvb, offset, size, ENC_ASCII | ENC_NA);
new_str = tvb_get_ephemeral_string(tvb, offset, size);
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
g_snprintf(str, MAX_SDP_LEN, "%s", new_str);
break;
default:
@ -2735,7 +2735,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
switch (attribute) {
case 0x350:
proto_tree_add_item(next_tree, hf_bpp_document_formats_supported, tvb, offset, size, ENC_ASCII | ENC_NA);
new_str = tvb_get_ephemeral_string(tvb, offset, size);
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
g_snprintf(str, MAX_SDP_LEN, "%s", new_str);
break;
case 0x352:
@ -2745,7 +2745,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
break;
case 0x354:
proto_tree_add_item(next_tree, hf_bpp_xhtml_print_image_formats_supported, tvb, offset, size, ENC_ASCII | ENC_NA);
new_str = tvb_get_ephemeral_string(tvb, offset, size);
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
g_snprintf(str, MAX_SDP_LEN, "%s", new_str);
break;
case 0x356:
@ -2755,17 +2755,17 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
break;
case 0x358:
proto_tree_add_item(next_tree, hf_bpp_1284_id, tvb, offset, size, ENC_ASCII | ENC_NA);
new_str = tvb_get_ephemeral_string(tvb, offset, size);
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
g_snprintf(str, MAX_SDP_LEN, "%s", new_str);
break;
case 0x35A:
proto_tree_add_item(next_tree, hf_bpp_printer_name, tvb, offset, size, ENC_ASCII | ENC_NA);
new_str = tvb_get_ephemeral_string(tvb, offset, size);
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
g_snprintf(str, MAX_SDP_LEN, "%s", new_str);
break;
case 0x35C:
proto_tree_add_item(next_tree, hf_bpp_printer_location, tvb, offset, size, ENC_ASCII | ENC_NA);
new_str = tvb_get_ephemeral_string(tvb, offset, size);
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
g_snprintf(str, MAX_SDP_LEN, "%s", new_str);
break;
case 0x35E:
@ -2775,7 +2775,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
break;
case 0x360:
proto_tree_add_item(next_tree, hf_bpp_media_types_supported, tvb, offset, size, ENC_ASCII | ENC_NA);
new_str = tvb_get_ephemeral_string(tvb, offset, size);
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
g_snprintf(str, MAX_SDP_LEN, "%s", new_str);
break;
case 0x362:
@ -2795,7 +2795,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
break;
case 0x368:
proto_tree_add_item(next_tree, hf_bpp_rui_formats_supported, tvb, offset, size, ENC_ASCII | ENC_NA);
new_str = tvb_get_ephemeral_string(tvb, offset, size);
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
g_snprintf(str, MAX_SDP_LEN, "%s", new_str);
break;
case 0x370:
@ -2810,17 +2810,17 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
break;
case 0x374:
proto_tree_add_item(next_tree, hf_bpp_reference_printing_top_url, tvb, offset, size, ENC_ASCII | ENC_NA);
new_str = tvb_get_ephemeral_string(tvb, offset, size);
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
g_snprintf(str, MAX_SDP_LEN, "%s", new_str);
break;
case 0x376:
proto_tree_add_item(next_tree, hf_bpp_direct_printing_top_url, tvb, offset, size, ENC_ASCII | ENC_NA);
new_str = tvb_get_ephemeral_string(tvb, offset, size);
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
g_snprintf(str, MAX_SDP_LEN, "%s", new_str);
break;
case 0x37A:
proto_tree_add_item(next_tree, hf_bpp_device_name, tvb, offset, size, ENC_ASCII | ENC_NA);
new_str = tvb_get_ephemeral_string(tvb, offset, size);
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
g_snprintf(str, MAX_SDP_LEN, "%s", new_str);
break;
default:
@ -2831,12 +2831,12 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
switch (attribute) {
case 0x368:
proto_tree_add_item(next_tree, hf_bpp_rui_formats_supported, tvb, offset, size, ENC_ASCII | ENC_NA);
new_str = tvb_get_ephemeral_string(tvb, offset, size);
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
g_snprintf(str, MAX_SDP_LEN, "%s", new_str);
break;
case 0x378:
proto_tree_add_item(next_tree, hf_bpp_printer_admin_rui_top_url, tvb, offset, size, ENC_ASCII | ENC_NA);
new_str = tvb_get_ephemeral_string(tvb, offset, size);
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
g_snprintf(str, MAX_SDP_LEN, "%s", new_str);
break;
default:
@ -2927,7 +2927,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
dissect_data_element(entry_tree, &sub_tree, pinfo, tvb, list_offset);
list_offset = get_type_length(tvb, list_offset, &entry_length);
new_str = tvb_get_ephemeral_string(tvb, list_offset, entry_length);
new_str = tvb_get_string(wmem_packet_scope(), tvb, list_offset, entry_length);
strpos += g_snprintf(str + strpos, MAX_SDP_LEN - strpos, "Lang: %s", new_str);
proto_item_append_text(entry_item, ": Lang: %s", new_str);
proto_tree_add_item(sub_tree, hf_sdp_lang_code, tvb, list_offset, entry_length, ENC_ASCII | ENC_NA);
@ -3010,17 +3010,17 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
break;
case 0x00A:
proto_tree_add_item(next_tree, hf_sdp_service_documentation_url, tvb, offset, size, ENC_ASCII | ENC_NA);
new_str = tvb_get_ephemeral_string(tvb, offset, size);
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
g_snprintf(str, MAX_SDP_LEN, "%s", new_str);
break;
case 0x00B:
proto_tree_add_item(next_tree, hf_sdp_service_client_executable_url, tvb, offset, size, ENC_ASCII | ENC_NA);
new_str = tvb_get_ephemeral_string(tvb, offset, size);
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
g_snprintf(str, MAX_SDP_LEN, "%s", new_str);
break;
case 0x00C:
proto_tree_add_item(next_tree, hf_sdp_service_icon_url, tvb, offset, size, ENC_ASCII | ENC_NA);
new_str = tvb_get_ephemeral_string(tvb, offset, size);
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
g_snprintf(str, MAX_SDP_LEN, "%s", new_str);
break;
case 0x00D:
@ -3048,17 +3048,17 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
break;
case 0x100:
proto_tree_add_item(next_tree, hf_sdp_service_name, tvb, offset, size, ENC_ASCII | ENC_NA);
new_str = tvb_get_ephemeral_string(tvb, offset, size);
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
g_snprintf(str, MAX_SDP_LEN, "%s", new_str);
break;
case 0x101:
proto_tree_add_item(next_tree, hf_sdp_service_description, tvb, offset, size, ENC_ASCII | ENC_NA);
new_str = tvb_get_ephemeral_string(tvb, offset, size);
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
g_snprintf(str, MAX_SDP_LEN, "%s", new_str);
break;
case 0x102:
proto_tree_add_item(next_tree, hf_sdp_service_provider_name, tvb, offset, size, ENC_ASCII | ENC_NA);
new_str = tvb_get_ephemeral_string(tvb, offset, size);
new_str = tvb_get_string(wmem_packet_scope(), tvb, offset, size);
g_snprintf(str, MAX_SDP_LEN, "%s", new_str);
break;
default:
@ -3112,7 +3112,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
}
case 8: /* fall through */
case 4: {
gchar *ptr = (gchar*)tvb_get_ephemeral_string(tvb, offset, size);
gchar *ptr = (gchar*)tvb_get_string(wmem_packet_scope(), tvb, offset, size);
proto_tree_add_text(next_tree, tvb, offset, size, "%s \"%s\"",
type == 8 ? "URL" : "String", ptr);

View File

@ -349,11 +349,11 @@ static uat_t *c1222_uat;
#define FILL_START int length, start_offset = offset;
#define FILL_TABLE(fieldname) \
length = offset - start_offset; \
fieldname = (guint8 *)tvb_g_memdup(tvb, start_offset, length); \
fieldname = (guint8 *)tvb_memdup(NULL, tvb, start_offset, length); \
fieldname##_len = length;
#define FILL_TABLE_TRUNCATE(fieldname, len) \
length = 1 + 2*(offset - start_offset); \
fieldname = (guint8 *)tvb_g_memdup(tvb, start_offset, length); \
fieldname = (guint8 *)tvb_memdup(NULL, tvb, start_offset, length); \
fieldname##_len = len;
#else /* HAVE_LIBGCRYPT */
#define FILL_TABLE(fieldname)
@ -436,7 +436,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
user_id = tvb_get_ntohs(tvb, *offset);
proto_tree_add_uint(tree, hf_c1222_logon_id, tvb, *offset, 2, user_id);
*offset += 2;
user_name = tvb_get_ephemeral_string(tvb, *offset, 10);
user_name = tvb_get_string(wmem_packet_scope(),tvb, *offset, 10);
proto_tree_add_string(tree, hf_c1222_logon_user, tvb, *offset, 10, user_name);
*offset += 10;
*length -= 12;
@ -448,7 +448,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
break;
case C1222_CMD_SECURITY:
if (*length >= 20) {
password = tvb_get_ephemeral_string(tvb, *offset, 20);
password = tvb_get_string(wmem_packet_scope(),tvb, *offset, 20);
proto_tree_add_string(tree, hf_c1222_security_password, tvb, *offset, 20, password);
*offset += 20;
*length -= 20;
@ -967,7 +967,7 @@ dissect_epsem(tvbuff_t *tvb, int offset, guint32 len, packet_info *pinfo, proto_
return offset;
encrypted = TRUE;
if (c1222_decrypt) {
buffer = (guchar *)tvb_g_memdup(tvb, offset, len2);
buffer = (guchar *)tvb_memdup(NULL, tvb, offset, len2);
if (!decrypt_packet(buffer, len2, TRUE)) {
g_free(buffer);
crypto_bad = TRUE;
@ -986,7 +986,7 @@ dissect_epsem(tvbuff_t *tvb, int offset, guint32 len, packet_info *pinfo, proto_
len2 = tvb_length_remaining(tvb, offset);
if (len2 <= 0)
return offset;
buffer = (guchar *)tvb_g_memdup(tvb, offset, len2);
buffer = (guchar *)tvb_memdup(NULL, tvb, offset, len2);
epsem_buffer = tvb_new_subset_remaining(tvb, offset);
if (c1222_decrypt) {
if (!decrypt_packet(buffer, len2, FALSE)) {

View File

@ -1920,7 +1920,7 @@ static void dissect_tty_lines(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
int linelen = tvb_find_line_end_unquoted(tvb, offset, -1, &next_offset);
/* Extract & add the string. */
char *string = (char*)tvb_get_ephemeral_string(tvb, offset, linelen);
char *string = (char*)tvb_get_string(wmem_packet_scope(), tvb, offset, linelen);
if (isascii(string[0])) {
/* If looks printable treat as string... */
proto_tree_add_string_format(tty_tree, hf_catapult_dct2000_tty_line,
@ -2465,7 +2465,7 @@ dissect_catapult_dct2000(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (strcmp(protocol_name, "comment") == 0) {
/* Extract & add the string. */
proto_item *string_ti;
char *string = (char*)tvb_get_ephemeral_string(tvb, offset, tvb_length_remaining(tvb, offset));
char *string = (char*)tvb_get_string(wmem_packet_scope(), tvb, offset, tvb_length_remaining(tvb, offset));
/* Show comment string */
string_ti = proto_tree_add_item(dct2000_tree, hf_catapult_dct2000_comment, tvb,
@ -2492,7 +2492,7 @@ dissect_catapult_dct2000(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
else
if (strcmp(protocol_name, "sprint") == 0) {
/* Extract & add the string. */
char *string = (char*)tvb_get_ephemeral_string(tvb, offset, tvb_length_remaining(tvb, offset));
char *string = (char*)tvb_get_string(wmem_packet_scope(), tvb, offset, tvb_length_remaining(tvb, offset));
/* Show sprint string */
proto_tree_add_item(dct2000_tree, hf_catapult_dct2000_sprint, tvb,

View File

@ -256,7 +256,7 @@ tvbuff_t * dissect_cbs_data(guint8 sms_encoding, tvbuff_t *tvb, proto_tree *tree
int length = tvb_length(tvb) - offset;
gchar *utf8_text = NULL, *utf8_out;
static unsigned char msgbuf[1024];
guint8 * input_string = tvb_get_ephemeral_string(tvb, offset, length);
guint8 * input_string = tvb_get_string(wmem_packet_scope(), tvb, offset, length);
GIConv cd;
GError *l_conv_error = NULL;
@ -352,12 +352,12 @@ dissect_gsm_cell_broadcast(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *cbs_page_subtree = proto_item_add_subtree(item, ett_gsm_cbs_page_content);
len = tvb_length(cbs_page_tvb);
proto_tree_add_string(cbs_page_subtree, hf_gsm_cbs_page_content, cbs_page_tvb, 0,
text_len, tvb_get_ephemeral_string(cbs_page_tvb, 0, text_len));
text_len, tvb_get_string(wmem_packet_scope(), cbs_page_tvb, 0, text_len));
len -= text_len;
if (len)
{
proto_tree_add_string(cbs_page_subtree, hf_gsm_cbs_page_content_padding, cbs_page_tvb, text_len, len,
tvb_get_ephemeral_string(cbs_page_tvb, text_len, len));
tvb_get_string(wmem_packet_scope(), cbs_page_tvb, text_len, len));
}
}
if (text_len)
@ -393,7 +393,7 @@ dissect_gsm_cell_broadcast(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
cbs_msg_item = proto_tree_add_protocol_format(proto_tree_get_root(tree), proto_cell_broadcast, cbs_msg_tvb, 0, len, "GSM Cell Broadcast Message");
cbs_msg_tree = proto_item_add_subtree(cbs_msg_item, ett_cbs_msg);
proto_tree_add_string(cbs_msg_tree, hf_gsm_cbs_message_content, cbs_msg_tvb, 0, len, tvb_get_ephemeral_string(cbs_msg_tvb, 0, len));
proto_tree_add_string(cbs_msg_tree, hf_gsm_cbs_message_content, cbs_msg_tvb, 0, len, tvb_get_string(wmem_packet_scope(), cbs_msg_tvb, 0, len));
}
}
@ -422,7 +422,7 @@ void dissect_umts_cell_broadcast_message(tvbuff_t *tvb, packet_info *pinfo, prot
msg_len = tvb_length(cbs_msg_tvb);
cbs_item2 = proto_tree_add_text(cbs_tree, tvb, offset, -1, "Cell Broadcast Message Contents (length: %d)", msg_len);
cbs_subtree = proto_item_add_subtree(cbs_item2, ett_cbs_msg);
proto_tree_add_text(cbs_subtree, cbs_msg_tvb , 0, tvb_length(cbs_msg_tvb), "%s", tvb_get_ephemeral_string(cbs_msg_tvb, 0, msg_len));
proto_tree_add_text(cbs_subtree, cbs_msg_tvb , 0, tvb_length(cbs_msg_tvb), "%s", tvb_get_string(wmem_packet_scope(), cbs_msg_tvb, 0, msg_len));
}
/* Register the protocol with Wireshark */

View File

@ -5806,7 +5806,7 @@ dissect_cip_cco_all_attribute_common( proto_tree *cmd_tree, tvbuff_t *tvb, int o
/* Connection Name */
connection_name_size = tvb_get_guint8( tvb, offset+variable_data_size);
str_connection_name = tvb_get_ephemeral_string(tvb, offset+variable_data_size+2, connection_name_size);
str_connection_name = tvb_get_string(wmem_packet_scope(), tvb, offset+variable_data_size+2, connection_name_size);
proto_tree_add_text(cmd_tree, tvb, offset+variable_data_size, connection_name_size+2, "Connection Name: %s", str_connection_name);
variable_data_size += ((connection_name_size*2)+2);

View File

@ -258,7 +258,7 @@ cmpp_octet_string(proto_tree *tree, tvbuff_t *tvb, gint field, gint offset, gint
{
char *display;
display = (char *)tvb_get_ephemeral_string(tvb, offset, length);
display = (char *)tvb_get_string(wmem_packet_scope(), tvb, offset, length);
proto_tree_add_string(tree, field, tvb, offset, length, display);
return display;
}

View File

@ -333,7 +333,7 @@ dissect_coap_opt_uri_host(tvbuff_t *tvb, proto_item *head_item, proto_tree *subt
{
guint8 *str = NULL;
str = tvb_get_ephemeral_string(tvb, offset, opt_length);
str = tvb_get_string(wmem_packet_scope(), tvb, offset, opt_length);
proto_tree_add_string(subtree, hf_coap_opt_uri_host, tvb, offset, opt_length, str);
@ -364,7 +364,7 @@ dissect_coap_opt_uri_path(tvbuff_t *tvb, proto_item *head_item, proto_tree *subt
if (opt_length == 0) {
str = nullstr;
} else {
str = tvb_get_ephemeral_string(tvb, offset, opt_length);
str = tvb_get_string(wmem_packet_scope(), tvb, offset, opt_length);
g_strlcat(coap_uri_str, str, sizeof(coap_uri_str));
}
@ -387,7 +387,7 @@ dissect_coap_opt_uri_query(tvbuff_t *tvb, proto_item *head_item,proto_tree *subt
if (opt_length == 0) {
str = nullstr;
} else {
str = tvb_get_ephemeral_string(tvb, offset, opt_length);
str = tvb_get_string(wmem_packet_scope(), tvb, offset, opt_length);
g_strlcat(coap_uri_str, str, sizeof(coap_uri_str));
}
@ -405,7 +405,7 @@ dissect_coap_opt_location_path(tvbuff_t *tvb, proto_item *head_item, proto_tree
if (opt_length == 0) {
str = nullstr;
} else {
str = tvb_get_ephemeral_string(tvb, offset, opt_length);
str = tvb_get_string(wmem_packet_scope(), tvb, offset, opt_length);
}
proto_tree_add_string(subtree, hf_coap_opt_location_path, tvb, offset, opt_length, str);
@ -422,7 +422,7 @@ dissect_coap_opt_location_query(tvbuff_t *tvb, proto_item *head_item, proto_tree
if (opt_length == 0) {
str = nullstr;
} else {
str = tvb_get_ephemeral_string(tvb, offset, opt_length);
str = tvb_get_string(wmem_packet_scope(), tvb, offset, opt_length);
}
proto_tree_add_string(subtree, hf_coap_opt_location_query, tvb, offset, opt_length, str);
@ -439,7 +439,7 @@ dissect_coap_opt_proxy_uri(tvbuff_t *tvb, proto_item *head_item, proto_tree *sub
if (opt_length == 0) {
str = nullstr;
} else {
str = tvb_get_ephemeral_string(tvb, offset, opt_length);
str = tvb_get_string(wmem_packet_scope(), tvb, offset, opt_length);
}
proto_tree_add_string(subtree, hf_coap_opt_proxy_uri, tvb, offset, opt_length, str);

View File

@ -396,7 +396,7 @@ dissect_collectd_string (tvbuff_t *tvb, packet_info *pinfo, gint type_hf,
*ret_offset = offset + 4;
*ret_length = length - 4;
*ret_string = tvb_get_ephemeral_string (tvb, *ret_offset, *ret_length);
*ret_string = tvb_get_string (wmem_packet_scope(), tvb, *ret_offset, *ret_length);
pi = proto_tree_add_text (tree_root, tvb, offset, length,
"collectd %s segment: \"%s\"",
@ -1008,7 +1008,7 @@ dissect_collectd (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
switch (part_type) {
case TYPE_HOST:
vdispatch.host = tvb_get_ephemeral_string (tvb,
vdispatch.host = tvb_get_string (wmem_packet_scope(), tvb,
offset + 4, part_length - 4);
if (pkt_host == NULL)
pkt_host = vdispatch.host;
@ -1017,14 +1017,14 @@ dissect_collectd (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case TYPE_TIME_HR:
break;
case TYPE_PLUGIN:
vdispatch.plugin = tvb_get_ephemeral_string (tvb,
vdispatch.plugin = tvb_get_string (wmem_packet_scope(), tvb,
offset + 4, part_length - 4);
pkt_plugins++;
break;
case TYPE_PLUGIN_INSTANCE:
break;
case TYPE_TYPE:
vdispatch.type = tvb_get_ephemeral_string (tvb,
vdispatch.type = tvb_get_string (wmem_packet_scope(), tvb,
offset + 4, part_length - 4);
break;
case TYPE_TYPE_INSTANCE:

View File

@ -1599,7 +1599,7 @@ static int dissect_cops_pr_object_data(tvbuff_t *tvb, packet_info *pinfo, guint3
encoid_len = tvb_length_remaining(oid_tvb,0);
if (encoid_len > 0) {
encoid = (guint8*)ep_tvb_memdup(oid_tvb,0,encoid_len);
encoid = (guint8*)tvb_memdup(wmem_packet_scope(),oid_tvb,0,encoid_len);
(*pprid_subids_len) = oid_encoded2subid(encoid, encoid_len, pprid_subids);
}
}
@ -1627,7 +1627,7 @@ static int dissect_cops_pr_object_data(tvbuff_t *tvb, packet_info *pinfo, guint3
/* TODO: check pc, class and tag */
encoid = (guint8*)ep_tvb_memdup(tvb,offset,encoid_len);
encoid = (guint8*)tvb_memdup(wmem_packet_scope(),tvb,offset,encoid_len);
if (*pprid_subids) {
/* Never tested this branch */
@ -2858,7 +2858,7 @@ info_to_display(tvbuff_t *tvb, proto_item *stt, int offset, int octets, const ch
/* Special section for printing strings */
if (mode==FMT_STR) {
codestr = tvb_get_ephemeral_string(tvb, offset, octets);
codestr = tvb_get_string(wmem_packet_scope(), tvb, offset, octets);
pi = proto_tree_add_string_format(stt, *hf_proto_parameter, tvb,
offset, octets, codestr, "%-28s : %s", str, codestr);
return pi;

View File

@ -74,7 +74,7 @@ dissect_data(tvbuff_t *tvb, packet_info *pinfo _U_ , proto_tree *tree)
proto_item *ti;
proto_tree *data_tree;
if (new_pane) {
guint8 *real_data = (guint8 *)tvb_g_memdup(tvb, 0, bytes);
guint8 *real_data = (guint8 *)tvb_memdup(NULL, tvb, 0, bytes);
data_tvb = tvb_new_child_real_data(tvb,real_data,bytes,bytes);
tvb_set_free_cb(data_tvb, g_free);
add_new_data_source(pinfo, data_tvb, "Not dissected data bytes");

View File

@ -311,7 +311,7 @@ dissect_dbus_sig(tvbuff_t *tvb, dbus_info_t *dinfo, proto_tree *tree, int offset
len = dinfo->get32(tvb, offset);
offset += 4;
val = tvb_get_ephemeral_string(tvb, offset, len);
val = tvb_get_string(wmem_packet_scope(), tvb, offset, len);
offset += (len + 1 /* NUL-byte */ + 3) & ~3;
if (sig == 's') {
@ -339,7 +339,7 @@ dissect_dbus_sig(tvbuff_t *tvb, dbus_info_t *dinfo, proto_tree *tree, int offset
len = tvb_get_guint8(tvb, offset);
offset += 1;
val = tvb_get_ephemeral_string(tvb, offset, len);
val = tvb_get_string(wmem_packet_scope(), tvb, offset, len);
offset += (len + 1);
ti = proto_tree_add_string_format(tree, hfi_dbus_value_str.id, tvb, org_offset, offset - org_offset, val, "SIGNATURE: %s", val);
@ -370,7 +370,7 @@ dissect_dbus_field_signature(tvbuff_t *tvb, dbus_info_t *dinfo, proto_tree *tree
/* sig_len = tvb_strsize(tvb, offset); */
sig = tvb_get_ephemeral_string(tvb, offset, sig_len);
sig = tvb_get_string(wmem_packet_scope(), tvb, offset, sig_len);
offset += (sig_len + 1);
ti = proto_tree_add_string(tree, &hfi_dbus_type_signature, tvb, org_offset, offset - org_offset, sig);

View File

@ -187,7 +187,7 @@ epm_dissect_ept_entry_t(tvbuff_t *tvb, int offset,
hf_epm_ann_offset, NULL);
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
hf_epm_ann_len, &len);
str=tvb_get_ephemeral_string(tvb, offset, len);
str=tvb_get_string(wmem_packet_scope(), tvb, offset, len);
proto_tree_add_item(tree, hf_epm_annotation, tvb, offset, len, ENC_ASCII|ENC_NA);
offset += len;
@ -440,17 +440,17 @@ epm_dissect_tower_data (tvbuff_t *tvb, int offset,
case PROTO_ID_NAMED_PIPES: /* \\PIPE\xxx named pipe */
proto_tree_add_item(tr, hf_epm_proto_named_pipes, tvb, offset, len, ENC_ASCII|ENC_NA);
proto_item_append_text(tr, "NamedPipe:%s", tvb_get_ephemeral_string(tvb, offset, len));
proto_item_append_text(tr, "NamedPipe:%s", tvb_get_string(wmem_packet_scope(), tvb, offset, len));
break;
case PROTO_ID_NAMED_PIPES_2: /* PIPENAME named pipe */
proto_tree_add_item(tr, hf_epm_proto_named_pipes, tvb, offset, len, ENC_ASCII|ENC_NA);
proto_item_append_text(tr, "PIPE:%s", tvb_get_ephemeral_string(tvb, offset, len));
proto_item_append_text(tr, "PIPE:%s", tvb_get_string(wmem_packet_scope(), tvb, offset, len));
break;
case PROTO_ID_NETBIOS: /* \\NETBIOS netbios name */
proto_tree_add_item(tr, hf_epm_proto_netbios_name, tvb, offset, len, ENC_ASCII|ENC_NA);
proto_item_append_text(tr, "NetBIOS:%s", tvb_get_ephemeral_string(tvb, offset, len));
proto_item_append_text(tr, "NetBIOS:%s", tvb_get_string(wmem_packet_scope(), tvb, offset, len));
break;
case PROTO_ID_HTTP: /* RPC over HTTP */
proto_tree_add_item(tr, hf_epm_proto_http_port, tvb, offset, 2, ENC_BIG_ENDIAN);

View File

@ -368,7 +368,7 @@ eventlog_dissect_element_Record_source_name(tvbuff_t *tvb, int offset, packet_in
char *str;
int len;
len=eventlog_get_unicode_string_length(tvb, offset);
str=tvb_get_ephemeral_faked_unicode(tvb, offset, len, TRUE);
str=tvb_get_faked_unicode(wmem_packet_scope(), tvb, offset, len, TRUE);
proto_tree_add_string_format(tree, hf_eventlog_Record_source_name, tvb, offset, len*2, str, "source_name: %s", str);
offset+=len*2;
return offset;
@ -379,7 +379,7 @@ eventlog_dissect_element_Record_computer_name(tvbuff_t *tvb, int offset, packet_
char *str;
int len;
len=eventlog_get_unicode_string_length(tvb, offset);
str=tvb_get_ephemeral_faked_unicode(tvb, offset, len, TRUE);
str=tvb_get_faked_unicode(wmem_packet_scope(), tvb, offset, len, TRUE);
proto_tree_add_string_format(tree, hf_eventlog_Record_computer_name, tvb, offset, len*2, str, "computer_name: %s", str);
offset+=len*2;
return offset;
@ -407,7 +407,7 @@ eventlog_dissect_element_Record_strings(tvbuff_t *tvb, int offset, packet_info *
char *str;
int len;
len=eventlog_get_unicode_string_length(tvb, string_offset);
str=tvb_get_ephemeral_faked_unicode(tvb, string_offset, len, TRUE);
str=tvb_get_faked_unicode(wmem_packet_scope(), tvb, string_offset, len, TRUE);
proto_tree_add_string_format(tree, hf_eventlog_Record_string, tvb, string_offset, len*2, str, "string: %s", str);
string_offset+=len*2;

View File

@ -589,7 +589,7 @@ typedef [string] byte NameString_t[AFS_NAMEMAX];
if (string_size < AFS_NAMEMAX)
{
proto_tree_add_item (tree, hf_fileexp_afsNameString_t_principalName_string, tvb, offset, string_size, ENC_ASCII|ENC_NA);
namestring = tvb_get_ephemeral_string (tvb, offset, string_size);
namestring = tvb_get_string (wmem_packet_scope(), tvb, offset, string_size);
offset += string_size;
if (check_col (pinfo->cinfo, COL_INFO))
col_append_fstr (pinfo->cinfo, COL_INFO, " Principal:%s", namestring);
@ -778,7 +778,7 @@ dissect_afsTaggedPath (tvbuff_t * tvb, int offset,
hf_fileexp_afsTaggedPath_tp_length, &tp_length);
proto_tree_add_item (tree, hf_fileexp_afsTaggedPath_tp_chars, tvb, offset,
tp_length, ENC_ASCII|ENC_NA);
tp_chars = tvb_get_ephemeral_string (tvb, offset, 1025);
tp_chars = tvb_get_string (wmem_packet_scope(), tvb, offset, 1025);
offset += 1025;
if (check_col (pinfo->cinfo, COL_INFO))
col_append_fstr (pinfo->cinfo, COL_INFO, " :tp_chars %s", tp_chars);
@ -1358,7 +1358,7 @@ dissect_afstaggedname (tvbuff_t * tvb, int offset,
{
proto_tree_add_item (tree, hf_fileexp_tn_string, tvb, offset,
tn_length, ENC_ASCII|ENC_NA);
tn_string = tvb_get_ephemeral_string (tvb, offset, 257);
tn_string = tvb_get_string (wmem_packet_scope(), tvb, offset, 257);
offset += 257;
if (check_col (pinfo->cinfo, COL_INFO))
col_append_fstr (pinfo->cinfo, COL_INFO, " :tn_tag: %s", tn_string);

View File

@ -349,7 +349,7 @@ dissect_vlconf_cell (tvbuff_t * tvb, int offset,
/* byte name[MAXVLCELLCHARS]; Cell name */
proto_tree_add_item (tree, hf_fldb_vlconf_cell_name, tvb, offset, 114, ENC_ASCII|ENC_NA);
name = tvb_get_ephemeral_string (tvb, offset, MAXVLCELLCHARS); /* XXX why 114 above and 128 here?? */
name = tvb_get_string (wmem_packet_scope(), tvb, offset, MAXVLCELLCHARS); /* XXX why 114 above and 128 here?? */
offset += MAXVLCELLCHARS; /* some reason this 114 seems to be incorrect... cutting 4 short to compensate.... */
if (check_col (pinfo->cinfo, COL_INFO))
col_append_fstr (pinfo->cinfo, COL_INFO, " Name: %s", name);
@ -388,7 +388,7 @@ dissect_vlconf_cell (tvbuff_t * tvb, int offset,
{
proto_tree_add_item (tree, hf_fldb_vlconf_cell_hostname, tvb, offset,
64, ENC_ASCII|ENC_NA);
hostname = tvb_get_ephemeral_string (tvb, offset, 64);
hostname = tvb_get_string (wmem_packet_scope(), tvb, offset, 64);
offset += 64; /* some reason this 114 seems to be incorrect... cutting 4 short to compensate.... */
if (check_col (pinfo->cinfo, COL_INFO))
col_append_fstr (pinfo->cinfo, COL_INFO, " hostName: %s", hostname);
@ -480,7 +480,7 @@ typedef [string] byte NameString_t[AFS_NAMEMAX];
proto_tree_add_item (tree,
hf_fldb_afsNameString_t_principalName_string,
tvb, offset, string_size, ENC_ASCII|ENC_NA);
namestring = tvb_get_ephemeral_string (tvb, offset, string_size);
namestring = tvb_get_string (wmem_packet_scope(), tvb, offset, string_size);
offset += string_size;
if (check_col (pinfo->cinfo, COL_INFO))
col_append_fstr (pinfo->cinfo, COL_INFO, " Principal:%s", namestring);
@ -706,7 +706,7 @@ dissect_vldbentry (tvbuff_t * tvb, int offset,
proto_tree_add_item (tree, hf_fldb_vldbentry_volumename, tvb, offset, 114,
ENC_ASCII|ENC_NA);
volumename = tvb_get_ephemeral_string (tvb, offset, 114);
volumename = tvb_get_string (wmem_packet_scope(), tvb, offset, 114);
offset += 110; /* some reason this 114 seems to be incorrect... cutting 4 short to compensate.... */
if (check_col (pinfo->cinfo, COL_INFO))
col_append_fstr (pinfo->cinfo, COL_INFO, " Name: %s", volumename);
@ -774,7 +774,7 @@ dissect_vldbentry (tvbuff_t * tvb, int offset,
{
proto_tree_add_item (tree, hf_fldb_vldbentry_siteprincipal, tvb,
offset, 64, ENC_ASCII|ENC_NA);
siteprincipal = tvb_get_ephemeral_string (tvb, offset, 64);
siteprincipal = tvb_get_string (wmem_packet_scope(), tvb, offset, 64);
offset += 64;
if (check_col (pinfo->cinfo, COL_INFO))
col_append_fstr (pinfo->cinfo, COL_INFO, " Princ: %s", siteprincipal);
@ -952,7 +952,7 @@ dissect_vldbentry (tvbuff_t * tvb, int offset,
/* byte LockerName[MAXLOCKNAMELEN]; */
proto_tree_add_item (tree, hf_fldb_vldbentry_lockername, tvb, offset,
MAXLOCKNAMELEN, ENC_ASCII|ENC_NA);
lockername = tvb_get_ephemeral_string (tvb, offset, MAXLOCKNAMELEN);
lockername = tvb_get_string (wmem_packet_scope(), tvb, offset, MAXLOCKNAMELEN);
offset += MAXLOCKNAMELEN; /* some reason this 114 seems to be incorrect... cutting 4 short to compensate.... */
if (check_col (pinfo->cinfo, COL_INFO))
col_append_fstr (pinfo->cinfo, COL_INFO, " LockerName: %s", lockername);
@ -960,7 +960,7 @@ dissect_vldbentry (tvbuff_t * tvb, int offset,
/* byte charSpares[50]; */
proto_tree_add_item (tree, hf_fldb_vldbentry_charspares, tvb, offset, 50,
ENC_ASCII|ENC_NA);
charspares = tvb_get_ephemeral_string (tvb, offset, 50);
charspares = tvb_get_string (wmem_packet_scope(), tvb, offset, 50);
offset += 50; /* some reason this 114 seems to be incorrect... cutting 4 short to compensate.... */
if (check_col (pinfo->cinfo, COL_INFO))
col_append_fstr (pinfo->cinfo, COL_INFO, " charSpares:%s", charspares);
@ -1118,7 +1118,7 @@ fldb_dissect_getsiteinfo_resp (tvbuff_t * tvb, int offset,
offset += 48; /* part of kerbprin before name... */
proto_tree_add_item (tree, hf_fldb_namestring, tvb, offset, 64, ENC_ASCII|ENC_NA);
namestring = tvb_get_ephemeral_string (tvb, offset, 64);
namestring = tvb_get_string (wmem_packet_scope(), tvb, offset, 64);
offset += 64;
if (check_col (pinfo->cinfo, COL_INFO))
col_append_fstr (pinfo->cinfo, COL_INFO, " %s", namestring);

View File

@ -7982,7 +7982,7 @@ dissect_packet_data(tvbuff_t *tvb ,tvbuff_t *auth_tvb _U_,
}
crypt_rc4_init(&rc4state,vars->encryption_key,16);
crypt_rc4(&rc4state,(guint8*)&copyconfounder,8);
decrypted = (guint8*)tvb_g_memdup(tvb, offset,data_len);
decrypted = (guint8*)tvb_memdup(NULL, tvb, offset,data_len);
crypt_rc4_init(&rc4state,vars->encryption_key,16);
crypt_rc4(&rc4state,decrypted,data_len);
buf = tvb_new_child_real_data(tvb, decrypted, data_len, data_len);

View File

@ -129,8 +129,8 @@ dissect_null_term_string(tvbuff_t *tvb, int offset,
}
len = tmp_offset - offset;
/* tvb_get_ephemeral_string didn't want the length with the 0*/
s = tvb_get_ephemeral_string(tvb, offset, len);
/* tvb_get_string didn't want the length with the 0*/
s = tvb_get_string(wmem_packet_scope(), tvb, offset, len);
proto_tree_add_string(tree, hf_index, tvb, offset, len + 1, s);
return tmp_offset;
@ -165,8 +165,8 @@ dissect_null_term_wstring(tvbuff_t *tvb, int offset,
}
len = tmp_offset - offset;
/* tvb_get_ephemeral_string didn't want the length with the 0*/
s = tvb_get_g_unicode_string(tvb, offset, len, ENC_LITTLE_ENDIAN);
/* tvb_get_string didn't want the length with the 0*/
s = tvb_get_unicode_string(NULL, tvb, offset, len, ENC_LITTLE_ENDIAN);
proto_tree_add_string(tree, hf_index, tvb, offset, len, s);
g_free(s);
@ -1285,7 +1285,7 @@ void cb_wstr_postprocess(packet_info *pinfo, proto_tree *tree _U_,
* some way we can get that string, rather than duplicating the
* efforts of that routine?
*/
s = tvb_get_ephemeral_unicode_string(
s = tvb_get_unicode_string(wmem_packet_scope(),
tvb, start_offset + 12, end_offset - start_offset - 12,
ENC_LITTLE_ENDIAN);
@ -1348,7 +1348,7 @@ void cb_str_postprocess(packet_info *pinfo, proto_tree *tree _U_,
* some way we can get that string, rather than duplicating the
* efforts of that routine?
*/
s = tvb_get_ephemeral_string(
s = tvb_get_string(wmem_packet_scope(),
tvb, start_offset + 12, (end_offset - start_offset - 12) );
/* Append string to COL_INFO */

View File

@ -77,13 +77,13 @@ rpriv_dissect_get_eptgt_rqst (tvbuff_t *tvb, int offset,
/* advance to get size of cell, and princ */
proto_tree_add_item (tree, hf_rpriv_get_eptgt_rqst_key_t, tvb, offset, key_size, ENC_ASCII|ENC_NA);
key_t1 = tvb_get_ephemeral_string(tvb, offset, key_size);
key_t1 = tvb_get_string(wmem_packet_scope(), tvb, offset, key_size);
offset += key_size;
offset += 8;
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_rpriv_get_eptgt_rqst_key_size2, &key_size2);
proto_tree_add_item (tree, hf_rpriv_get_eptgt_rqst_key_t2, tvb, offset, key_size2, ENC_ASCII|ENC_NA);
key_t2 = tvb_get_ephemeral_string(tvb, offset, key_size2);
key_t2 = tvb_get_string(wmem_packet_scope(), tvb, offset, key_size2);
offset += key_size2;

View File

@ -66,7 +66,7 @@ rs_acct_dissect_lookup_rqst (tvbuff_t *tvb, int offset,
if (key_size){ /* Not able to yet decipher the OTHER versions of this call just yet. */
proto_tree_add_item (tree, hf_rs_acct_lookup_rqst_key_t, tvb, offset, key_size, ENC_ASCII|ENC_NA);
keyx_t = tvb_get_ephemeral_string(tvb, offset, key_size);
keyx_t = tvb_get_string(wmem_packet_scope(), tvb, offset, key_size);
offset += key_size;
if (check_col(pinfo->cinfo, COL_INFO)) {
@ -97,7 +97,7 @@ rs_acct_dissect_get_projlist_rqst (tvbuff_t *tvb, int offset,
proto_tree_add_item (tree, hf_rs_acct_get_projlist_rqst_key_t,
tvb, offset, key_size, ENC_ASCII|ENC_NA);
keyx_t = tvb_get_ephemeral_string(tvb, offset, key_size);
keyx_t = tvb_get_string(wmem_packet_scope(), tvb, offset, key_size);
offset += key_size;
if (check_col(pinfo->cinfo, COL_INFO)) {

View File

@ -64,7 +64,7 @@ rs_misc_dissect_login_get_info_rqst (tvbuff_t *tvb, int offset,
if (key_size){ /* Not able to yet decipher the OTHER versions of this call just yet. */
proto_tree_add_item (tree, hf_rs_misc_login_get_info_rqst_key_t, tvb, offset, key_size, ENC_ASCII|ENC_NA);
key_t1 = tvb_get_ephemeral_string(tvb, offset, key_size);
key_t1 = tvb_get_string(wmem_packet_scope(), tvb, offset, key_size);
offset += key_size;
if (check_col(pinfo->cinfo, COL_INFO)) {

View File

@ -207,7 +207,7 @@ dissect sec_rgy_pname const signed32 sec_rgy_pname_t_size = 257; * In
{
if (check_col (pinfo->cinfo, COL_INFO))
col_append_fstr (pinfo->cinfo, COL_INFO, " Principal:%s",
tvb_get_ephemeral_string(tvb, offset, string_size));
tvb_get_string(wmem_packet_scope(), tvb, offset, string_size));
}
offset += string_size;
}
@ -429,7 +429,7 @@ dissect_sec_rgy_name_t (tvbuff_t * tvb, int offset,
{
if (check_col (pinfo->cinfo, COL_INFO))
col_append_fstr (pinfo->cinfo, COL_INFO, " Principal:%s",
tvb_get_ephemeral_string (tvb, offset, string_size));
tvb_get_string (wmem_packet_scope(), tvb, offset, string_size));
}
offset += string_size;
}

View File

@ -700,7 +700,7 @@ dissect_printerdata_data(tvbuff_t *tvb, int offset,
switch(type) {
case DCERPC_REG_SZ: {
char *data = tvb_get_g_unicode_string(tvb, offset - size, size, ENC_LITTLE_ENDIAN);
char *data = tvb_get_unicode_string(NULL, tvb, offset - size, size, ENC_LITTLE_ENDIAN);
proto_item_append_text(item, ": %s", data);
@ -1099,7 +1099,7 @@ dissect_spoolss_uint16uni(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
return offset;
}
text = tvb_get_g_unicode_string(tvb, offset, remaining, ENC_LITTLE_ENDIAN);
text = tvb_get_unicode_string(NULL, tvb, offset, remaining, ENC_LITTLE_ENDIAN);
len = (int)strlen(text);
proto_tree_add_text(tree, tvb, offset, len * 2, "%s: %s",
@ -5908,7 +5908,7 @@ cb_notify_str_postprocess(packet_info *pinfo _U_,
len = tvb_get_letohl(tvb, start_offset);
s = tvb_get_g_unicode_string(
s = tvb_get_unicode_string(NULL,
tvb, start_offset + 4, (end_offset - start_offset - 4), ENC_LITTLE_ENDIAN);
/* Append string to upper-level proto_items */

View File

@ -1686,7 +1686,7 @@ dissect_ndr_cvstring(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree_add_item() with the appropriate ENC_ value? */
/* XXX - should this ever be used with something that's *not*
an FT_STRING? */
s = tvb_get_ephemeral_unicode_string(tvb, offset, buffer_len, ENC_LITTLE_ENDIAN);
s = tvb_get_unicode_string(wmem_packet_scope(), tvb, offset, buffer_len, ENC_LITTLE_ENDIAN);
if (tree && buffer_len) {
hfinfo = proto_registrar_get_nth(hfindex);
tvb_ensure_bytes_exist(tvb, offset, buffer_len);
@ -1701,7 +1701,7 @@ dissect_ndr_cvstring(tvbuff_t *tvb, int offset, packet_info *pinfo,
} else {
/*
* "tvb_get_ephemeral_string()" throws an exception if the entire string
* "tvb_get_string()" throws an exception if the entire string
* isn't in the tvbuff. If the length is bogus, this should
* keep us from trying to allocate an immensely large buffer.
* (It won't help if the length is *valid* but immensely large,
@ -1713,7 +1713,7 @@ dissect_ndr_cvstring(tvbuff_t *tvb, int offset, packet_info *pinfo,
* octet string? What if size_is is neither 1 nor 2?
*/
tvb_ensure_bytes_exist(tvb, offset, buffer_len);
s = tvb_get_ephemeral_string(tvb, offset, buffer_len);
s = tvb_get_string(wmem_packet_scope(), tvb, offset, buffer_len);
if (tree && buffer_len)
proto_tree_add_item(string_tree, hfindex, tvb, offset,
buffer_len, DREP_ENC_INTEGER(drep));
@ -1875,7 +1875,7 @@ dissect_ndr_vstring(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree_add_item() with the appropriate ENC_ value? */
/* XXX - should this ever be used with something that's *not*
an FT_STRING? */
s = tvb_get_ephemeral_unicode_string(tvb, offset, buffer_len, ENC_LITTLE_ENDIAN);
s = tvb_get_unicode_string(wmem_packet_scope(), tvb, offset, buffer_len, ENC_LITTLE_ENDIAN);
if (tree && buffer_len) {
hfinfo = proto_registrar_get_nth(hfindex);
tvb_ensure_bytes_exist(tvb, offset, buffer_len);
@ -1890,7 +1890,7 @@ dissect_ndr_vstring(tvbuff_t *tvb, int offset, packet_info *pinfo,
} else {
/*
* "tvb_get_ephemeral_string()" throws an exception if the entire string
* "tvb_get_string()" throws an exception if the entire string
* isn't in the tvbuff. If the length is bogus, this should
* keep us from trying to allocate an immensely large buffer.
* (It won't help if the length is *valid* but immensely large,
@ -1902,7 +1902,7 @@ dissect_ndr_vstring(tvbuff_t *tvb, int offset, packet_info *pinfo,
* octet string? What if size_is is neither 1 nor 2?
*/
tvb_ensure_bytes_exist(tvb, offset, buffer_len);
s = tvb_get_ephemeral_string(tvb, offset, buffer_len);
s = tvb_get_string(wmem_packet_scope(), tvb, offset, buffer_len);
if (tree && buffer_len)
proto_tree_add_item(string_tree, hfindex, tvb, offset,
buffer_len, DREP_ENC_INTEGER(drep));
@ -4193,7 +4193,7 @@ dissect_dcerpc_cn_rts(tvbuff_t *tvb, gint offset, packet_info *pinfo,
const guint32 conformance_count = dcerpc_tvb_get_ntohl(tvb, offset, hdr->drep);
proto_tree_add_uint(cn_rts_command_tree, hf_dcerpc_cn_rts_command_conformancecount, tvb, offset, 4, conformance_count);
offset += 4;
padding = (guint8 *)tvb_g_memdup(tvb, offset, conformance_count);
padding = (guint8 *)tvb_memdup(NULL, tvb, offset, conformance_count);
proto_tree_add_bytes(cn_rts_command_tree, hf_dcerpc_cn_rts_command_padding, tvb, offset, conformance_count, padding);
offset += conformance_count;
} break;
@ -4219,7 +4219,7 @@ dissect_dcerpc_cn_rts(tvbuff_t *tvb, gint offset, packet_info *pinfo,
offset += 16;
} break;
}
padding = (guint8 *)tvb_g_memdup(tvb, offset, 12);
padding = (guint8 *)tvb_memdup(NULL, tvb, offset, 12);
proto_tree_add_bytes(cn_rts_command_tree, hf_dcerpc_cn_rts_command_padding, tvb, offset, 12, padding);
offset += 12;
} break;

View File

@ -4926,7 +4926,7 @@ dissect_dcm_assoc_item(tvbuff_t *tvb, proto_tree *tree, guint32 offset,
switch (item_value_type) {
case DCM_ITEM_VALUE_TYPE_UID:
*item_value = (gchar *)tvb_get_ephemeral_string(tvb, offset+4, item_len);
*item_value = (gchar *)tvb_get_string(wmem_packet_scope(), tvb, offset+4, item_len);
uid = (dcm_uid_t *)g_hash_table_lookup(dcm_uid_table, (gpointer) *item_value);
if (uid) {
@ -4944,7 +4944,7 @@ dissect_dcm_assoc_item(tvbuff_t *tvb, proto_tree *tree, guint32 offset,
break;
case DCM_ITEM_VALUE_TYPE_STRING:
*item_value = (gchar *)tvb_get_ephemeral_string(tvb, offset+4, item_len);
*item_value = (gchar *)tvb_get_string(wmem_packet_scope(), tvb, offset+4, item_len);
proto_item_append_text(assoc_item_pitem, "%s", *item_value);
proto_tree_add_string(assoc_item_ptree, *hf_value, tvb, offset+4, item_len, *item_value);
@ -4997,7 +4997,7 @@ dissect_dcm_assoc_sopclass_extneg(tvbuff_t *tvb, proto_tree *tree, guint32 offse
proto_tree_add_item(assoc_item_extneg_tree, hf_dcm_assoc_item_len, tvb, offset+2, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(assoc_item_extneg_tree, hf_dcm_info_extneg_sopclassuid_len, tvb, offset+4, 2, ENC_BIG_ENDIAN);
sopclassuid_str = (gchar *)tvb_get_ephemeral_string(tvb, offset+6, sop_class_uid_len);
sopclassuid_str = (gchar *)tvb_get_string(wmem_packet_scope(), tvb, offset+6, sop_class_uid_len);
sopclassuid = (dcm_uid_t *)g_hash_table_lookup(dcm_uid_table, (gpointer) sopclassuid_str);
if (sopclassuid) {
@ -5099,7 +5099,7 @@ dissect_dcm_assoc_role_selection(tvbuff_t *tvb, proto_tree *tree, guint32 offset
proto_tree_add_item(assoc_item_rolesel_tree, hf_dcm_assoc_item_len, tvb, offset+2, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(assoc_item_rolesel_tree, hf_dcm_info_rolesel_sopclassuid_len, tvb, offset+4, 2, ENC_BIG_ENDIAN);
sopclassuid_str = (gchar *)tvb_get_ephemeral_string(tvb, offset+6, sop_class_uid_len);
sopclassuid_str = (gchar *)tvb_get_string(wmem_packet_scope(), tvb, offset+6, sop_class_uid_len);
sopclassuid = (dcm_uid_t *)g_hash_table_lookup(dcm_uid_table, (gpointer) sopclassuid_str);
scu_role = tvb_get_guint8(tvb, offset+6+sop_class_uid_len);
@ -6201,7 +6201,7 @@ dissect_dcm_tag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Controlled exit, if VR does not fit. */
if (dcm_tag_is_open(pdv, offset_tag, offset_vr, endpos, 2)) return endpos;
vr = (gchar *)tvb_get_ephemeral_string(tvb, offset, 2);
vr = (gchar *)tvb_get_string(wmem_packet_scope(), tvb, offset, 2);
offset += 2;
g_free(pdv->open_tag.vr);

View File

@ -179,7 +179,7 @@ dissect_dcp_etsi (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void *
if(tvb_length(tvb) < 11)
return FALSE;
sync = tvb_get_ephemeral_string (tvb, 0, 2);
sync = tvb_get_string (wmem_packet_scope(), tvb, 0, 2);
if((sync[0]!='A' && sync[0]!='P') || sync[1]!='F')
return FALSE;
@ -636,14 +636,14 @@ dissect_tpl(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
while(offset<tvb_length(tvb)) {
guint32 bits;
guint32 bytes;
char *tag = (char*)tvb_get_ephemeral_string (tvb, offset, 4); offset += 4;
char *tag = (char*)tvb_get_string (wmem_packet_scope(), tvb, offset, 4); offset += 4;
bits = tvb_get_ntohl(tvb, offset); offset += 4;
bytes = bits / 8;
if(bits % 8)
bytes++;
if(tree) {
if(strcmp(tag, "*ptr")==0) {
prot = (char*)tvb_get_ephemeral_string (tvb, offset, 4);
prot = (char*)tvb_get_string (wmem_packet_scope(), tvb, offset, 4);
maj = tvb_get_ntohs(tvb, offset+4);
min = tvb_get_ntohs(tvb, offset+6);
proto_tree_add_bytes_format(tpl_tree, hf_tpl_tlv, tvb,

View File

@ -462,7 +462,7 @@ dissect_dec_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += 3;
ti = proto_tree_add_item(rt_tree, hf_dec_rt_dst_addr, tvb,
offset, 6, ENC_NA);
addr = dnet_ntoa((const guint8 *)ep_tvb_memdup(tvb, offset, 6));
addr = dnet_ntoa((const guint8 *)tvb_memdup(wmem_packet_scope(), tvb, offset, 6));
if (addr != NULL) {
proto_item_append_text(ti, " (%s)", addr);
}
@ -473,7 +473,7 @@ dissect_dec_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += 8;
ti = proto_tree_add_item(rt_tree, hf_dec_rt_src_addr, tvb,
offset, 6, ENC_NA);
addr = dnet_ntoa((const guint8 *)ep_tvb_memdup(tvb, offset, 6));
addr = dnet_ntoa((const guint8 *)tvb_memdup(wmem_packet_scope(), tvb, offset, 6));
if (addr != NULL) {
proto_item_append_text(ti, " (%s)", addr);
}
@ -720,7 +720,7 @@ do_hello_msg(
my_offset +=3;
ti = proto_tree_add_item(tree, hf_dec_rt_id, tvb,
my_offset, 6, ENC_NA);
addr = dnet_ntoa((const guint8 *)ep_tvb_memdup(tvb, my_offset, 6));
addr = dnet_ntoa((const guint8 *)tvb_memdup(wmem_packet_scope(), tvb, my_offset, 6));
if (addr != NULL) {
proto_item_append_text(ti, " (%s)", addr);
}
@ -764,7 +764,7 @@ do_hello_msg(
my_offset += 8;
ti = proto_tree_add_item(tree, hf_dec_rt_neighbor, tvb,
my_offset, 6, ENC_NA);
addr = dnet_ntoa((const guint8 *)ep_tvb_memdup(tvb, my_offset, 6));
addr = dnet_ntoa((const guint8 *)tvb_memdup(wmem_packet_scope(), tvb, my_offset, 6));
if (addr != NULL) {
proto_item_append_text(ti, " (%s)", addr);
}
@ -813,7 +813,7 @@ do_hello_msg(
ti_localb = proto_tree_add_item(list_ether, hf_dec_rt_router_id,
tvb, my_offset, 6, ENC_NA);
addr = dnet_ntoa((const guint8 *)ep_tvb_memdup(tvb, my_offset, 6));
addr = dnet_ntoa((const guint8 *)tvb_memdup(wmem_packet_scope(), tvb, my_offset, 6));
if (addr != NULL) {
proto_item_append_text(ti_localb, " (%s)", addr);
}

View File

@ -569,7 +569,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* XXX - if this is truly like DHCP option 81,
* we need to dissect it as such.
*/
proto_item_append_text(oi,", \"%s\"", tvb_get_ephemeral_string(tvb, offset, option_length));
proto_item_append_text(oi,", \"%s\"", tvb_get_string(wmem_packet_scope(), tvb, offset, option_length));
proto_tree_add_item(option_tree,
hf_dhcpfo_client_identifier, tvb, offset,
@ -634,7 +634,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case DHCP_FO_PD_VENDOR_CLASS:
vendor_class_str =
tvb_get_ephemeral_string(tvb, offset, option_length);
tvb_get_string(wmem_packet_scope(), tvb, offset, option_length);
proto_item_append_text(oi,", \"%s\"",
format_text(vendor_class_str, option_length));
proto_tree_add_string(option_tree,

View File

@ -688,7 +688,7 @@ swap_field_length_with_char(tvbuff_t* tvb, wmem_strbuf_t* strbuf, gint offset, g
offset++;
len_cnt++;
wmem_strbuf_append(strbuf, tvb_get_ephemeral_string(tvb, offset, next_length));
wmem_strbuf_append(strbuf, tvb_get_string(wmem_packet_scope(), tvb, offset, next_length));
len_cnt += next_length;
/* Do not append replacement character to end of string. */
@ -1099,7 +1099,7 @@ dissect_cablelabs_specific_opts(proto_tree *v_tree, proto_item *v_item, packet_i
opt_len = tlv_len;
field_len = tlv_len;
device_type = tvb_get_ephemeral_string(tvb, sub_off, field_len);
device_type = tvb_get_string(wmem_packet_scope(), tvb, sub_off, field_len);
if (device_type == NULL || strlen(device_type) == 0) {
proto_item_append_text(ti, "Packet does not contain Device Type.");

View File

@ -1652,7 +1652,7 @@ static void dmp_add_seq_ack_analysis (tvbuff_t *tvb, packet_info *pinfo,
static gchar *dissect_7bit_string (tvbuff_t *tvb, gint offset, gint length)
{
guchar *encoded = tvb_get_ephemeral_string (tvb, offset, length);
guchar *encoded = tvb_get_string (wmem_packet_scope(), tvb, offset, length);
guchar *decoded = (guchar *)wmem_alloc0 (wmem_packet_scope(), (size_t)(length * 1.2) + 1);
guchar rest = 0, bits = 1;
gint len = 0, i;
@ -3049,7 +3049,7 @@ static void dissect_dmp_structured_id (tvbuff_t *tvb, proto_tree *body_tree,
break;
case STRUCT_ID_STRING:
dmp.struct_id = tvb_get_ephemeral_string (tvb, offset, (gint) dmp_struct_length);
dmp.struct_id = tvb_get_string (wmem_packet_scope(), tvb, offset, (gint) dmp_struct_length);
proto_tree_add_item (body_tree, hf_message_bodyid_string, tvb, offset, dmp_struct_length, ENC_ASCII|ENC_NA);
break;
@ -3081,7 +3081,7 @@ static gint dissect_dmp_message (tvbuff_t *tvb, packet_info *pinfo,
if (dmp.body_format == FREE_TEXT_SUBJECT) {
len = tvb_strsize (tvb, offset);
if (dmp_subject_as_id) {
dmp.struct_id = tvb_get_ephemeral_string (tvb, offset, len);
dmp.struct_id = tvb_get_string (wmem_packet_scope(), tvb, offset, len);
}
proto_tree_add_item (message_tree, hf_message_subject, tvb, offset, len, ENC_ASCII|ENC_NA);
offset += len;

View File

@ -2453,7 +2453,7 @@ dnp3_al_process_object(tvbuff_t *tvb, packet_info *pinfo, int offset,
if (al_filename_len > 0) {
const gchar *al_filename;
al_filename = tvb_get_ephemeral_string(tvb, data_pos, al_filename_len);
al_filename = tvb_get_string(wmem_packet_scope(), tvb, data_pos, al_filename_len);
proto_tree_add_text(point_tree, tvb, data_pos, al_filename_len, "File Name: %s", al_filename);
}
data_pos += al_filename_len;

View File

@ -1973,10 +1973,10 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset,
cpu_offset = cur_offset;
cpu_len = tvb_get_guint8(tvb, cpu_offset);
cpu = tvb_get_ephemeral_string(tvb, cpu_offset + 1, cpu_len);
cpu = tvb_get_string(wmem_packet_scope(), tvb, cpu_offset + 1, cpu_len);
os_offset = cpu_offset + 1 + cpu_len;
os_len = tvb_get_guint8(tvb, os_offset);
os = tvb_get_ephemeral_string(tvb, os_offset + 1, os_len);
os = tvb_get_string(wmem_packet_scope(), tvb, os_offset + 1, os_len);
if (cinfo != NULL) {
col_append_fstr(cinfo, COL_INFO, " %.*s %.*s", cpu_len, cpu,
os_len, os);
@ -2450,7 +2450,7 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset,
flags_len = tvb_get_guint8(tvb, offset);
offset += 1;
proto_tree_add_item(rr_tree, hf_dns_naptr_flags, tvb, offset, flags_len, ENC_ASCII|ENC_NA);
flags = tvb_get_ephemeral_string(tvb, offset, flags_len);
flags = tvb_get_string(wmem_packet_scope(), tvb, offset, flags_len);
offset += flags_len;
/* Service */
@ -3380,10 +3380,10 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset,
cur_offset++;
tag_len = tvb_get_guint8(tvb, cur_offset);
tag = tvb_get_ephemeral_string(tvb, cur_offset + 1, tag_len);
tag = tvb_get_string(wmem_packet_scope(), tvb, cur_offset + 1, tag_len);
value_len = data_len - (tag_len + 2);
value = tvb_get_ephemeral_string(tvb, cur_offset + 1 + tag_len, value_len);
value = tvb_get_string(wmem_packet_scope(), tvb, cur_offset + 1 + tag_len, value_len);
value = format_text(value, value_len);

View File

@ -438,7 +438,7 @@ dissect_dsi_reply_get_status(tvbuff_t *tvb, proto_tree *tree, gint offset)
case 4: /* DNS */
case 5: /* SSH tunnel */
if (len > 2) {
tmp = tvb_get_ephemeral_string(tvb, ofs +2, len -2);
tmp = tvb_get_string(wmem_packet_scope(), tvb, ofs +2, len -2);
ti = proto_tree_add_text(adr_tree, tvb, ofs, len, "%s: %s",
(type==4)?"dns":"ssh tunnel", tmp);
break;
@ -489,7 +489,7 @@ dissect_dsi_reply_get_status(tvbuff_t *tvb, proto_tree *tree, gint offset)
ofs = utf_ofs;
ulen = tvb_get_ntohs(tvb, ofs);
tmp = tvb_get_ephemeral_string(tvb, ofs + 2, ulen);
tmp = tvb_get_string(wmem_packet_scope(), tvb, ofs + 2, ulen);
ti = proto_tree_add_text(tree, tvb, ofs, ulen + 2, "UTF8 server name: %s", tmp);
sub_tree = proto_item_add_subtree(ti, ett_dsi_utf8_name);
proto_tree_add_uint(sub_tree, hf_dsi_utf8_server_name_len, tvb, ofs, 2, ulen);

View File

@ -1543,7 +1543,7 @@ display_metadata_block(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int
/* and second is the creator custodian EID */
cteb_creator_custodian_eid_length = block_length - sdnv_length;
cteb_creator_custodian_eid = (char *) tvb_get_ephemeral_string(tvb, offset, cteb_creator_custodian_eid_length);
cteb_creator_custodian_eid = (char *) tvb_get_string(wmem_packet_scope(), tvb, offset, cteb_creator_custodian_eid_length);
ti = proto_tree_add_string(block_tree, hf_block_control_block_cteb_creator_custodian_eid, tvb, offset,
cteb_creator_custodian_eid_length, cteb_creator_custodian_eid);

View File

@ -234,7 +234,7 @@ dissect_dtpt_wstring(tvbuff_t *tvb, guint offset, proto_tree *tree, int hfindex)
guint32 wstring_padding = 0;
wstring_length = tvb_get_letohl(tvb, offset);
wstring_data = tvb_get_ephemeral_unicode_string(tvb, offset+4, wstring_length, ENC_LITTLE_ENDIAN);
wstring_data = tvb_get_unicode_string(wmem_packet_scope(), tvb, offset+4, wstring_length, ENC_LITTLE_ENDIAN);
wstring_size = wstring_length;
if (wstring_size%4) {
wstring_padding = (4-wstring_size%4);

View File

@ -114,7 +114,7 @@ dissect_text_interface_identifier_parameter(tvbuff_t *parameter_tvb, proto_tree
proto_tree_add_item(parameter_tree, hf_text_interface_id,
parameter_tvb, TEXT_INTERFACE_ID_OFFSET, interface_id_length, ENC_ASCII|ENC_NA);
proto_item_append_text(parameter_item, " (%.*s)", interface_id_length,
tvb_get_ephemeral_string(parameter_tvb, TEXT_INTERFACE_ID_OFFSET, interface_id_length));
tvb_get_string(wmem_packet_scope(), parameter_tvb, TEXT_INTERFACE_ID_OFFSET, interface_id_length));
}
#define INFO_STRING_OFFSET PARAMETER_VALUE_OFFSET
@ -128,7 +128,7 @@ dissect_info_string_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tre
proto_tree_add_item(parameter_tree, hf_info_string,
parameter_tvb, INFO_STRING_OFFSET, info_string_length, ENC_ASCII|ENC_NA);
proto_item_append_text(parameter_item, " (%.*s)", info_string_length,
tvb_get_ephemeral_string(parameter_tvb, INFO_STRING_OFFSET, info_string_length));
tvb_get_string(wmem_packet_scope(), parameter_tvb, INFO_STRING_OFFSET, info_string_length));
}
#define DLCI_LENGTH 2

View File

@ -2150,7 +2150,7 @@ decrypt_sac_msg_body(
clear_data = (unsigned char *)g_malloc(clear_len);
err = gcry_cipher_decrypt (cipher, clear_data, clear_len,
tvb_get_ephemeral_string(encrypted_tvb, offset, len), len);
tvb_get_string(wmem_packet_scope(), encrypted_tvb, offset, len), len);
if (gcry_err_code (err))
goto end;
@ -2218,7 +2218,7 @@ dissect_si_string(tvbuff_t *tvb, gint offset, gint str_len,
str_len--;
}
si_str = tvb_get_ephemeral_string(tvb, offset, str_len);
si_str = tvb_get_string(wmem_packet_scope(), tvb, offset, str_len);
if (!si_str)
return;
@ -2487,8 +2487,8 @@ dissect_dvbci_payload_ap(guint32 tag, gint len_field _U_,
offset++;
/* ephemeral -> string is freed automatically when dissection
of this packet is finished
tvb_get_ephemeral_string() always returns a 0-terminated string */
menu_string = tvb_get_ephemeral_string(tvb, offset, menu_str_len);
tvb_get_string() always returns a 0-terminated string */
menu_string = tvb_get_string(wmem_packet_scope(), tvb, offset, menu_str_len);
if (menu_string) {
col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL,
"Module name %s", menu_string);
@ -2988,7 +2988,7 @@ dissect_dvbci_payload_hlc(guint32 tag, gint len_field _U_,
}
/* both apdus' body is only a country code, this can be shared */
str = tvb_get_ephemeral_string(tvb, offset,
str = tvb_get_string(wmem_packet_scope(), tvb, offset,
tvb_reported_length_remaining(tvb, offset));
if (str)
col_append_sep_fstr(pinfo->cinfo, COL_INFO, ": ", "%s", str);
@ -3342,7 +3342,7 @@ dissect_dvbci_payload_ami(guint32 tag, gint len_field _U_,
offset++;
proto_tree_add_item(tree, hf_dvbci_app_dom_id,
tvb, offset, app_dom_id_len, ENC_ASCII|ENC_NA);
app_dom_id = tvb_get_ephemeral_string(tvb, offset, app_dom_id_len);
app_dom_id = tvb_get_string(wmem_packet_scope(), tvb, offset, app_dom_id_len);
if (app_dom_id) {
col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ",
"for %s", app_dom_id);
@ -3372,7 +3372,7 @@ dissect_dvbci_payload_ami(guint32 tag, gint len_field _U_,
if (tvb_reported_length_remaining(tvb, offset) <= 0)
break;
if (req_type==REQ_TYPE_FILE || req_type==REQ_TYPE_FILE_HASH) {
req_str = tvb_get_ephemeral_string(tvb, offset,
req_str = tvb_get_string(wmem_packet_scope(), tvb, offset,
tvb_reported_length_remaining(tvb, offset));
if (!req_str)
break;
@ -3405,7 +3405,7 @@ dissect_dvbci_payload_ami(guint32 tag, gint len_field _U_,
proto_tree_add_text(tree, tvb, offset, 1,
"File name length %d", file_name_len);
offset++;
file_name_str = tvb_get_ephemeral_string(
file_name_str = tvb_get_string(wmem_packet_scope(),
tvb, offset, file_name_len);
if (!file_name_str)
break;

View File

@ -599,7 +599,7 @@ static guint8 edonkey_metatag_name_get_type(tvbuff_t *tvb, gint start, gint leng
if (try_val_to_str(special_tagtype, edonkey_special_tags) == NULL) {
gint idx;
tag_name = tvb_get_ephemeral_string(tvb, start, length);
tag_name = tvb_get_string(wmem_packet_scope(), tvb, start, length);
idx = lookup_str_index(tag_name, length, edonkey_special_tags);
if (idx < 0)
return EDONKEY_STAG_UNKNOWN;
@ -916,7 +916,7 @@ static int dissect_kademlia_tagname(tvbuff_t *tvb, packet_info *pinfo _U_,
hidden_item = proto_tree_add_uint(tree, hf_edonkey_string_length, tvb, offset, 2, string_length);
PROTO_ITEM_SET_HIDDEN(hidden_item);
tagname = tvb_get_ephemeral_string( tvb, offset + 2, string_length );
tagname = tvb_get_string(wmem_packet_scope(), tvb, offset + 2, string_length );
tag_full_name = "UnknownTagName";
@ -948,7 +948,7 @@ static int dissect_kademlia_string(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree_add_uint(tree, hf_edonkey_string_length, tvb, offset, 2, string_length);
string_value = tvb_get_ephemeral_string( tvb, offset + 2, string_length );
string_value = tvb_get_string(wmem_packet_scope(), tvb, offset + 2, string_length );
proto_tree_add_text(tree, tvb, offset+2, string_length, "String: %s", string_value);
@ -1089,7 +1089,7 @@ static int dissect_kademlia_tag_string(tvbuff_t *tvb, packet_info *pinfo _U_,
PROTO_ITEM_SET_HIDDEN(hidden_item);
hidden_item = proto_tree_add_item(tree, hf_edonkey_string, tvb, offset+2, string_length, ENC_ASCII|ENC_NA);
PROTO_ITEM_SET_HIDDEN(hidden_item);
*string_value = tvb_get_ephemeral_string(tvb, offset + 2, string_length);
*string_value = tvb_get_string(wmem_packet_scope(), tvb, offset + 2, string_length);
proto_tree_add_item(tree, hf_kademlia_tag_string, tvb, offset + 2, string_length, ENC_ASCII|ENC_NA);
return offset + 2 + string_length;

View File

@ -1326,7 +1326,7 @@ dissect_eigrp_service (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
* followed by a '<'), try XML. Otherwise, try plain-text.
*/
xml_tvb = tvb_new_subset(sub_tvb, sub_offset, length, length);
test_string = tvb_get_ephemeral_string(xml_tvb, 0, (length < 32 ?
test_string = tvb_get_string(wmem_packet_scope(), xml_tvb, 0, (length < 32 ?
length : 32));
tok = strtok(test_string, " \t\r\n");

View File

@ -218,7 +218,7 @@ dissect_lower_address(proto_item *ti_arg, gint ett_arg,
offset += 8; /* skip the zero bytes */
/* SUFFIX */
suffix = tvb_get_ephemeral_string(tvb, offset+1, len2);
suffix = tvb_get_string(wmem_packet_scope(), tvb, offset+1, len2);
ti = proto_tree_add_item(tree, hf_suff, tvb, offset, 1, ENC_ASCII|ENC_LITTLE_ENDIAN);
offset += len2+1;
@ -450,7 +450,7 @@ dissect_elcom(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (tvb_get_guint8(tvb, 3+1+TOTAL_LEN+LOWADR_LEN) != SUFFIX_LEN) return;
/* finally believe that there is valid suffix */
suffix = tvb_get_ephemeral_string(tvb, 3+2+LOWADR_LEN, 2);
suffix = tvb_get_string(wmem_packet_scope(), tvb, 3+2+LOWADR_LEN, 2);
col_append_fstr(pinfo->cinfo, COL_INFO, " %s Connect", suffix);
break;

View File

@ -496,7 +496,7 @@ dissect_pool_handle_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tre
handle_length = tvb_get_ntohs(parameter_tvb, PARAMETER_LENGTH_OFFSET) - PARAMETER_HEADER_LENGTH;
pi = proto_tree_add_item(parameter_tree, hf_pool_handle, parameter_tvb, POOL_HANDLE_OFFSET, handle_length, ENC_NA);
tmp = (gchar*)tvb_get_ephemeral_string(parameter_tvb, POOL_HANDLE_OFFSET, handle_length);
tmp = (gchar*)tvb_get_string(wmem_packet_scope(), parameter_tvb, POOL_HANDLE_OFFSET, handle_length);
proto_item_append_text(pi, " (%s)", tmp);
}

View File

@ -147,7 +147,7 @@ dissect_epmd_request(packet_info *pinfo, tvbuff_t *tvb, gint offset, proto_tree
name_length = tvb_get_ntohs(tvb, offset);
proto_tree_add_item(tree, hf_epmd_name_len, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_epmd_name, tvb, offset + 2, name_length, ENC_ASCII|ENC_NA);
name = tvb_get_ephemeral_string(tvb, offset + 2, name_length);
name = tvb_get_string(wmem_packet_scope(), tvb, offset + 2, name_length);
offset += 2 + name_length;
if (tvb_length_remaining(tvb, offset) >= 2) {
guint16 elen=0;
@ -163,7 +163,7 @@ dissect_epmd_request(packet_info *pinfo, tvbuff_t *tvb, gint offset, proto_tree
case EPMD_PORT2_REQ:
name_length = tvb_length_remaining(tvb, offset);
proto_tree_add_item(tree, hf_epmd_name, tvb, offset, name_length, ENC_ASCII|ENC_NA);
name = tvb_get_ephemeral_string(tvb, offset, name_length);
name = tvb_get_string(wmem_packet_scope(), tvb, offset, name_length);
break;
case EPMD_ALIVE_REQ:
@ -171,7 +171,7 @@ dissect_epmd_request(packet_info *pinfo, tvbuff_t *tvb, gint offset, proto_tree
offset += 2;
name_length = tvb_length_remaining(tvb, offset);
proto_tree_add_item(tree, hf_epmd_name, tvb, offset, name_length, ENC_ASCII|ENC_NA);
name = tvb_get_ephemeral_string(tvb, offset, name_length);
name = tvb_get_string(wmem_packet_scope(), tvb, offset, name_length);
break;
case EPMD_NAMES_REQ:
@ -250,7 +250,7 @@ dissect_epmd_response(packet_info *pinfo, tvbuff_t *tvb, gint offset, proto_tree
name_length = tvb_get_ntohs(tvb, offset);
proto_tree_add_item(tree, hf_epmd_name_len, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_epmd_name, tvb, offset + 2, name_length, ENC_ASCII|ENC_NA);
name = tvb_get_ephemeral_string(tvb, offset + 2, name_length);
name = tvb_get_string(wmem_packet_scope(), tvb, offset + 2, name_length);
offset += 2 + name_length;
if (tvb_length_remaining(tvb, offset) >= 2) {
guint16 elen=0;

View File

@ -239,7 +239,7 @@ static gint dissect_etf_dist_header(packet_info *pinfo _U_, tvbuff_t *tvb, gint
proto_tree_add_uint(acr_tree, hf_erldp_atom_length, tvb, offset, 1, atom_txt_len);
offset++;
}
str = tvb_get_ephemeral_string(tvb, offset, atom_txt_len);
str = tvb_get_string(wmem_packet_scope(), tvb, offset, atom_txt_len);
proto_tree_add_item(acr_tree, hf_erldp_atom_text, tvb, offset, atom_txt_len, ENC_NA|ENC_ASCII);
proto_item_append_text(ti_acr, " - '%s'", str);
offset += atom_txt_len;
@ -448,7 +448,7 @@ static void dissect_erldp_handshake(tvbuff_t *tvb, packet_info *pinfo, proto_tre
offset += 4;
}
str_len = tvb_length_remaining(tvb, offset);
str = tvb_get_ephemeral_string(tvb, offset, str_len);
str = tvb_get_string(wmem_packet_scope(), tvb, offset, str_len);
proto_tree_add_item(tree, hf_erldp_name, tvb, offset, str_len, ENC_ASCII|ENC_NA);
col_add_fstr(pinfo->cinfo, COL_INFO, "%s %s", (is_challenge) ? "SEND_CHALLENGE" : "SEND_NAME", str);
break;
@ -469,7 +469,7 @@ static void dissect_erldp_handshake(tvbuff_t *tvb, packet_info *pinfo, proto_tre
case 's' :
str_len = tvb_length_remaining(tvb, offset);
str = tvb_get_ephemeral_string(tvb, offset, str_len);
str = tvb_get_string(wmem_packet_scope(), tvb, offset, str_len);
proto_tree_add_item(tree, hf_erldp_status, tvb, offset, str_len, ENC_ASCII|ENC_NA);
col_add_fstr(pinfo->cinfo, COL_INFO, "SEND_STATUS %s", str);
break;

View File

@ -261,7 +261,7 @@ ess_dissect_attribute_flags (tvbuff_t *tvb, asn1_ctx_t *actx)
guint i;
tree = proto_item_add_subtree (actx->created_item, ett_Category_attributes);
value = tvb_get_ephemeral_string (tvb, 0, tvb_length (tvb));
value = tvb_get_string (wmem_packet_scope(), tvb, 0, tvb_length (tvb));
for (i = 0; i < num_ess_category_attributes; i++) {
ess_category_attributes_t *u = &(ess_category_attributes[i]);

View File

@ -1204,7 +1204,7 @@ dissect_cat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case 0x76: /* Geographical Location Parameters / IARI */
if (ims_event) {
proto_tree_add_unicode_string(elem_tree, hf_ctlv_iari, tvb, pos, len,
tvb_get_ephemeral_string_enc(tvb, pos, len, ENC_UTF_8 | ENC_NA));
tvb_get_string_enc(wmem_packet_scope(), tvb, pos, len, ENC_UTF_8 | ENC_NA));
}
break;
case 0x77: /* GAD Shapes / IMPU list */
@ -1214,7 +1214,7 @@ dissect_cat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (tvb_get_guint8(tvb, pos+i) == 0x80) {
g8 = tvb_get_guint8(tvb, pos+i+1);
proto_tree_add_unicode_string(elem_tree, hf_ctlv_impu, tvb, pos+i+2, g8,
tvb_get_ephemeral_string_enc(tvb, pos+i+2, g8, ENC_UTF_8 | ENC_NA));
tvb_get_string_enc(wmem_packet_scope(), tvb, pos+i+2, g8, ENC_UTF_8 | ENC_NA));
i += 2+g8;
} else {
break;
@ -1224,7 +1224,7 @@ dissect_cat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
case 0x78: /* NMEA sentence / IMS Status-Code */
if (ims_event) {
guint8 *status_code = tvb_get_ephemeral_string(tvb, pos, len);
guint8 *status_code = tvb_get_string(wmem_packet_scope(), tvb, pos, len);
proto_tree_add_string_format_value(elem_tree, hf_ctlv_ims_status_code, tvb, pos, len,
status_code, "%s (%s)", status_code, str_to_str(status_code, ims_status_code, "Unknown"));
}

View File

@ -125,7 +125,7 @@ dissect_exported_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
switch(tag){
case EXP_PDU_TAG_PROTO_NAME:
next_proto_type = EXPORTED_PDU_NEXT_PROTO_STR;
proto_name = tvb_get_ephemeral_string(tvb, offset, tag_len);
proto_name = tvb_get_string(wmem_packet_scope(), tvb, offset, tag_len);
proto_tree_add_item(tag_tree, hf_exported_pdu_prot_name, tvb, offset, tag_len, ENC_ASCII|ENC_NA);
break;
case EXP_PDU_TAG_IPV4_SRC:

View File

@ -431,7 +431,7 @@ dissect_display_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, p
offset += 4;
length -= 4;
display_name = tvb_get_ephemeral_string(tvb, offset, length);
display_name = tvb_get_string(wmem_packet_scope(), tvb, offset, length);
proto_item_append_text(display_item, ": \"%s\"",
format_text(display_name, strlen(display_name)));
proto_tree_add_string(display_tree, hf_edp_display_string, tvb, offset, length,
@ -625,7 +625,7 @@ dissect_vlan_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, prot
offset += 4;
length -= 4;
vlan_name = tvb_get_ephemeral_string(tvb, offset, length);
vlan_name = tvb_get_string(wmem_packet_scope(), tvb, offset, length);
proto_item_append_text(vlan_item, ", Name \"%s\"",
format_text(vlan_name, strlen(vlan_name)));
proto_tree_add_string(vlan_tree, hf_edp_vlan_name, tvb, offset, length,

View File

@ -1055,9 +1055,9 @@ dissect_fc_helper (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean
/* Yes - dissect it. */
if (tree) {
proto_tree_add_string (fc_tree, hf_fc_nh_da, tvb, next_offset, 8,
fcwwn_to_str (tvb_get_ephemeral_string (tvb, offset, 8)));
fcwwn_to_str (tvb_get_string (wmem_packet_scope(), tvb, offset, 8)));
proto_tree_add_string (fc_tree, hf_fc_nh_sa, tvb, offset+8, 8,
fcwwn_to_str (tvb_get_ephemeral_string (tvb, offset+8, 8)));
fcwwn_to_str (tvb_get_string (wmem_packet_scope(), tvb, offset+8, 8)));
}
next_offset += 16;
}

View File

@ -1281,7 +1281,7 @@ static guint8 *
zonenm_to_str (tvbuff_t *tvb, gint offset)
{
int len = tvb_get_guint8 (tvb, offset);
return tvb_get_ephemeral_string (tvb, offset+4, len);
return tvb_get_string (wmem_packet_scope(), tvb, offset+4, len);
}
static void
@ -1347,7 +1347,7 @@ dissect_fcdns_swils_entries (tvbuff_t *tvb, proto_tree *tree, int offset)
proto_tree_add_item (tree, &hfi_fcdns_sw2_objfmt, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_string (tree, &hfi_fcdns_rply_ownerid, tvb, offset+1,
3, fc_to_str (tvb_get_ephemeral_string (tvb, offset+1,
3, fc_to_str (tvb_get_string (wmem_packet_scope(), tvb, offset+1,
3)));
proto_tree_add_item (tree, &hfi_fcdns_rply_ptype, tvb, offset+4,
1, ENC_BIG_ENDIAN);

View File

@ -127,11 +127,11 @@ dissect_nv_pairs(tvbuff_t *tvb, proto_tree *fcgi_tree, gint offset, guint16 len)
offset += 4;
}
name = tvb_get_ephemeral_string(tvb, offset, namelen);
name = tvb_get_string(wmem_packet_scope(), tvb, offset, namelen);
offset += namelen;
if (valuelen > 0) {
value = tvb_get_ephemeral_string(tvb, offset, valuelen);
value = tvb_get_string(wmem_packet_scope(), tvb, offset, valuelen);
offset += valuelen;
proto_tree_add_text(fcgi_tree, tvb, start_offset, offset - start_offset, "%s = %s", name, value);

View File

@ -469,7 +469,7 @@ static guint8 *
zonenm_to_str(tvbuff_t *tvb, gint offset)
{
int len = tvb_get_guint8(tvb, offset);
return tvb_get_ephemeral_string(tvb, offset+4, len);
return tvb_get_string(wmem_packet_scope(), tvb, offset+4, len);
}
/* Offset points to the start of the zone object */

View File

@ -118,7 +118,7 @@ static int fix_next_header(tvbuff_t *tvb, int offset)
{
/* try to resync to the next start */
guint min_len = tvb_length_remaining(tvb, offset);
const guint8 *data = tvb_get_ephemeral_string(tvb, offset, min_len);
const guint8 *data = tvb_get_string(wmem_packet_scope(), tvb, offset, min_len);
const guint8 *start = data;
while ((start = strstr(start, "\0018"))) {
@ -192,7 +192,7 @@ static int fix_header_len(tvbuff_t *tvb, int offset)
return fix_next_header(tvb, offset);
}
value = tvb_get_ephemeral_string(tvb, tag->value_offset, tag->value_len);
value = tvb_get_string(wmem_packet_scope(), tvb, tag->value_offset, tag->value_len);
/* Fix version, msg type, length and checksum aren't in body length.
* If the packet is big enough find the checksum
*/
@ -270,7 +270,7 @@ dissect_fix_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
return;
}
value = tvb_get_ephemeral_string(tvb, tag->value_offset, tag->value_len);
value = tvb_get_string(wmem_packet_scope(), tvb, tag->value_offset, tag->value_len);
msg_type = str_to_str(value, messages_val, "FIX Message (%s)");
col_add_str(pinfo->cinfo, COL_INFO, msg_type);
@ -287,7 +287,7 @@ dissect_fix_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
continue;
}
tag_str = tvb_get_ephemeral_string(tvb, field_offset, tag->tag_len);
tag_str = tvb_get_string(wmem_packet_scope(), tvb, field_offset, tag->tag_len);
tag_value = atoi(tag_str);
if (tag->value_len < 1) {
proto_tree *field_tree;
@ -311,7 +311,7 @@ dissect_fix_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
found = 1;
}
value = tvb_get_ephemeral_string(tvb, tag->value_offset, tag->value_len);
value = tvb_get_string(wmem_packet_scope(), tvb, tag->value_offset, tag->value_len);
if (found) {
if (fix_fields[i].table) {
if (tree) {

Some files were not shown because too many files have changed in this diff Show More