aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-aim-chat.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-04-09 01:04:37 -0700
committerGuy Harris <guy@alum.mit.edu>2014-04-09 08:05:07 +0000
commit7d83a8755a20579ec7d6b98b341ae17d8cb6bf65 (patch)
tree2ba6123af90a2a402000239de17f879b6d26a801 /epan/dissectors/packet-aim-chat.c
parent412c6cabcfd96efeae6c13f1e918d99be002eaf8 (diff)
Don't use tvb_get_nstringz0(), use tvb_get_string_enc().
Change-Id: I8e654fa857fca6713198e3d20f2a14a0a444e935 Reviewed-on: https://code.wireshark.org/review/1037 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-aim-chat.c')
-rw-r--r--epan/dissectors/packet-aim-chat.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/epan/dissectors/packet-aim-chat.c b/epan/dissectors/packet-aim-chat.c
index 9347b5990e..a0ff6e592f 100644
--- a/epan/dissectors/packet-aim-chat.c
+++ b/epan/dissectors/packet-aim-chat.c
@@ -81,13 +81,12 @@ static int dissect_aim_chat_userinfo_list(tvbuff_t *tvb, packet_info *pinfo, pro
static int dissect_aim_chat_outgoing_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *chat_tree _U_)
{
- guchar *buddyname;
+ guint8 *buddyname;
guchar *msg;
int buddyname_length;
- buddyname=(guchar *)wmem_alloc(wmem_packet_scope(), MAX_BUDDYNAME_LENGTH+1);
msg=(guchar *)wmem_alloc(wmem_packet_scope(), 1000);
- buddyname_length = aim_get_buddyname( buddyname, tvb, 30, 31 );
+ buddyname_length = aim_get_buddyname( &buddyname, tvb, 30 );
/* channel message from client */
aim_get_message( msg, tvb, 40 + buddyname_length, tvb_length(tvb)
@@ -101,14 +100,13 @@ static int dissect_aim_chat_outgoing_msg(tvbuff_t *tvb, packet_info *pinfo, prot
static int dissect_aim_chat_incoming_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *chat_tree)
{
- guchar *buddyname;
+ guint8 *buddyname;
guchar *msg;
/* channel message to client */
int buddyname_length;
- buddyname=(guchar *)wmem_alloc(wmem_packet_scope(), MAX_BUDDYNAME_LENGTH+1);
msg=(guchar *)wmem_alloc(wmem_packet_scope(), 1000);
- buddyname_length = aim_get_buddyname( buddyname, tvb, 30, 31 );
+ buddyname_length = aim_get_buddyname( &buddyname, tvb, 30 );
aim_get_message( msg, tvb, 36 + buddyname_length, tvb_length(tvb)
- 36 - buddyname_length );