diff options
author | Gerald Combs <gerald@wireshark.org> | 2003-04-30 02:35:28 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2003-04-30 02:35:28 +0000 |
commit | 0b9bbbbdb6cf76403a4e9d94a74668429dea89ae (patch) | |
tree | b94c51a362b4d129f4b3800dfba39f4e3ffadb3d /packet-fix.c | |
parent | 5174f6075ed8661fe0ee9a97a7b485b685e2b3e7 (diff) | |
download | wireshark-0b9bbbbdb6cf76403a4e9d94a74668429dea89ae.tar.gz wireshark-0b9bbbbdb6cf76403a4e9d94a74668429dea89ae.tar.bz2 wireshark-0b9bbbbdb6cf76403a4e9d94a74668429dea89ae.zip |
Modify tvb_get_nstringz*() to behave more like snprintf(). Make changes
where necessary to reflect the new behavior.
svn path=/trunk/; revision=7607
Diffstat (limited to 'packet-fix.c')
-rw-r--r-- | packet-fix.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packet-fix.c b/packet-fix.c index 3ffabb7cb6..281ddbd1ec 100644 --- a/packet-fix.c +++ b/packet-fix.c @@ -2,7 +2,7 @@ * Routines for Financial Information eXchange (FIX) Protocol dissection * Copyright 2000, PC Drew <drewpc@ibsncentral.com> * - * $Id: packet-fix.c,v 1.1 2002/09/16 17:49:17 jmayer Exp $ + * $Id: packet-fix.c,v 1.2 2003/04/30 02:35:19 gerald Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -879,7 +879,7 @@ dissect_fix(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) value_offset = equals + 1; value_len = ctrla_offset - value_offset; - value = g_malloc0(value_len + 1); + value = g_malloc(value_len); tvb_get_nstringz0(tvb, value_offset, value_len, value); if (check_col(pinfo->cinfo, COL_INFO)) { @@ -918,11 +918,11 @@ dissect_fix(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) value_len = ctrla_offset - value_offset; tag_len = equals - field_offset; - tag_str = g_malloc0(tag_len + 1); + tag_str = g_malloc(tag_len); tvb_get_nstringz0(tvb, field_offset, tag_len, tag_str); tag = atoi(tag_str); - value = g_malloc0(value_len + 1); + value = g_malloc(value_len); tvb_get_nstringz0(tvb, value_offset, value_len, value); switch(tag) { |