aboutsummaryrefslogtreecommitdiffstats
path: root/packet-fw1.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-06-12 07:37:30 +0000
committerGuy Harris <guy@alum.mit.edu>2003-06-12 07:37:30 +0000
commit96524f20bc4c9fc7be2eb86d178a8396254ee42e (patch)
tree5288fce46c34f4bee84fba1adf8bfc957b1ff61f /packet-fw1.c
parente502949ecca7b0c69d8e563aaf6c04e3c13b8ecd (diff)
There are 10 bytes of interface name in the header; make the buffer for
the interface name 10+1 bytes (1 byte for a terminating null - we mustn't assume there's one in the header, as *no* Ethereal dissector should ever make assumptions about file contents that would cause misbehavior) rather than 20 bytes (the extra 9 bytes wouldn't be used and aren't necessary), and pass the size of the buffer to "tvb_get_nstringz0()" rather than the size of the field in the packet. svn path=/trunk/; revision=7856
Diffstat (limited to 'packet-fw1.c')
-rw-r--r--packet-fw1.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/packet-fw1.c b/packet-fw1.c
index a48e3a97b6..b8d0e4c721 100644
--- a/packet-fw1.c
+++ b/packet-fw1.c
@@ -2,7 +2,7 @@
* Routines for Ethernet header disassembly of FW1 "monitor" files
* Copyright 2002, Alfred Koebler <ak@icon-sult.de>
*
- * $Id: packet-fw1.c,v 1.6 2002/12/10 00:12:58 guy Exp $
+ * $Id: packet-fw1.c,v 1.7 2003/06/12 07:37:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Alfred Koebler <ak@icon-sult.de>
@@ -110,7 +110,7 @@ dissect_fw1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item *ti;
proto_tree *volatile fh_tree = NULL;
char direction[3];
- char interface_name[20];
+ char interface_name[10+1];
guint16 etype;
char header[1000];
char *p_header;
@@ -146,7 +146,7 @@ dissect_fw1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* fetch info to local variable */
direction[0] = tvb_get_guint8(tvb, 0);
direction[1] = 0;
- tvb_get_nstringz0(tvb, 2, 10, interface_name);
+ tvb_get_nstringz0(tvb, 2, sizeof interface_name, interface_name);
/* Known interface name - if not, remember it */
found=1;