summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-11-13 23:38:33 +0000
committerGuy Harris <guy@alum.mit.edu>2003-11-13 23:38:33 +0000
commit624fe0ec15f6f4934671dd80147e8bf96690ae65 (patch)
treed86a91be04aa4316faa0989321a0181bd7b1f810
parentca5235bc356ee71700269effb54c85d7214b6194 (diff)
downloadwireshark-624fe0ec15f6f4934671dd80147e8bf96690ae65.tar.gz
Require that field names contain only alphanumerics, "-", "_", and ".".
Fix the names that contained other characters. svn path=/trunk/; revision=8959
-rw-r--r--epan/proto.c11
-rw-r--r--packet-eapol.c4
-rw-r--r--packet-isup.c4
-rw-r--r--packet-ldp.c4
-rw-r--r--packet-m2ua.c4
5 files changed, 18 insertions, 9 deletions
diff --git a/epan/proto.c b/epan/proto.c
index f7ba267cb3..23d14ebd7b 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -1,7 +1,7 @@
/* proto.c
* Routines for protocol tree
*
- * $Id: proto.c,v 1.101 2003/10/29 23:48:13 guy Exp $
+ * $Id: proto.c,v 1.102 2003/11/13 23:38:33 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -28,6 +28,7 @@
#include <stdio.h>
#include <string.h>
+#include <ctype.h>
#include <glib.h>
#include <float.h>
@@ -2394,6 +2395,14 @@ proto_register_field_init(header_field_info *hfinfo, int parent)
if ((hfinfo->name[0] != 0) && (hfinfo->abbrev[0] != 0 )) {
header_field_info *same_name_hfinfo, *same_name_next_hfinfo;
+ char *p;
+ guchar c;
+
+ /* Check that the filter name (abbreviation) is legal;
+ * it must contain only alphanumerics, '-', "_", and ".". */
+ for (p = hfinfo->abbrev; (c = *p) != '\0'; p++)
+ g_assert(isalnum(c) || c == '-' || c == '_' ||
+ c == '.');
/* We allow multiple hfinfo's to be registered under the same
* abbreviation. This was done for X.25, as, depending
diff --git a/packet-eapol.c b/packet-eapol.c
index f6c58ee2fd..7ff12eda0a 100644
--- a/packet-eapol.c
+++ b/packet-eapol.c
@@ -3,7 +3,7 @@
* (From IEEE Draft P802.1X/D11; is there a later draft, or a
* final standard? If so, check it.)
*
- * $Id: packet-eapol.c,v 1.15 2003/10/14 09:11:53 guy Exp $
+ * $Id: packet-eapol.c,v 1.16 2003/11/13 23:38:32 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -371,7 +371,7 @@ proto_register_eapol(void)
"WPA Key RSC", "eapol.keydes.rsc", FT_BYTES, BASE_NONE, NULL,
0x0, "WPA Key Receive Sequence Counter", HFILL }},
{ &hf_eapol_wpa_keydes_id, {
- "WPA Key ID", "eapol,keydes.id", FT_BYTES, BASE_NONE, NULL,
+ "WPA Key ID", "eapol.keydes.id", FT_BYTES, BASE_NONE, NULL,
0x0, "WPA Key ID", HFILL }},
{ &hf_eapol_wpa_keydes_mic, {
"WPA Key MIC", "eapol.keydes.mic", FT_BYTES, BASE_NONE, NULL,
diff --git a/packet-isup.c b/packet-isup.c
index 2a8d340b6b..6f57a4a718 100644
--- a/packet-isup.c
+++ b/packet-isup.c
@@ -5,7 +5,7 @@
* <anders.broman@ericsson.com>
* Inserted routines for BICC dissection according to Q.765.5 Q.1902 Q.1970 Q.1990,
* calling SDP dissector for RFC2327 decoding.
- * $Id: packet-isup.c,v 1.35 2003/10/20 19:13:17 guy Exp $
+ * $Id: packet-isup.c,v 1.36 2003/11/13 23:38:32 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -6060,7 +6060,7 @@ proto_register_isup(void)
"", HFILL }},
{ &hf_isup_app_Release_call_ind,
- { "Release call indicator (RCI)", "isup.app_Release_call_ indicator",
+ { "Release call indicator (RCI)", "isup.app_Release_call_indicator",
FT_BOOLEAN, 8, TFS(&isup_Release_call_indicator_value), A_8BIT_MASK,
"", HFILL }},
diff --git a/packet-ldp.c b/packet-ldp.c
index 8176f66b17..e9a2782923 100644
--- a/packet-ldp.c
+++ b/packet-ldp.c
@@ -1,7 +1,7 @@
/* packet-ldp.c
* Routines for LDP (RFC 3036) packet disassembly
*
- * $Id: packet-ldp.c,v 1.45 2003/10/10 21:16:24 guy Exp $
+ * $Id: packet-ldp.c,v 1.46 2003/11/13 23:38:33 guy Exp $
*
* Copyright (c) November 2000 by Richard Sharpe <rsharpe@ns.aus.com>
*
@@ -2319,7 +2319,7 @@ proto_register_ldp(void)
{ "Targeted Hello", "ldp.msg.tlv.hello.targeted", FT_BOOLEAN, 16, TFS(&hello_targeted_vals), 0x8000, "Hello Common Parameters Targeted Bit", HFILL }},
{ &hf_ldp_tlv_val_request,
- { "Hello Requested", "ldp,msg.tlv.hello.requested", FT_BOOLEAN, 16, TFS(&hello_requested_vals), 0x4000, "Hello Common Parameters Hello Requested Bit", HFILL }},
+ { "Hello Requested", "ldp.msg.tlv.hello.requested", FT_BOOLEAN, 16, TFS(&hello_requested_vals), 0x4000, "Hello Common Parameters Hello Requested Bit", HFILL }},
{ &hf_ldp_tlv_val_res,
{ "Reserved", "ldp.msg.tlv.hello.res", FT_UINT16, BASE_HEX, NULL, 0x3FFF, "Hello Common Parameters Reserved Field", HFILL }},
diff --git a/packet-m2ua.c b/packet-m2ua.c
index 629324caf7..85c54e1b4a 100644
--- a/packet-m2ua.c
+++ b/packet-m2ua.c
@@ -6,7 +6,7 @@
*
* Copyright 2002, Michael Tuexen <tuexen [AT] fh-muenster.de>
*
- * $Id: packet-m2ua.c,v 1.12 2003/09/04 14:32:01 tuexen Exp $
+ * $Id: packet-m2ua.c,v 1.13 2003/11/13 23:38:33 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1067,7 +1067,7 @@ proto_register_m2ua(void)
{ &hf_status_type, { "Status type", "m2ua.status_type", FT_UINT16, BASE_DEC, VALS(status_type_values), 0x0, "", HFILL } },
{ &hf_status_ident, { "Status info", "m2ua.status_info", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_asp_id, { "ASP identifier", "m2ua.asp_identifier", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
- { &hf_correlation_id, { "Correlation identifier", "m2ua.correlation identifier", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
+ { &hf_correlation_id, { "Correlation identifier", "m2ua.correlation_identifier", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_data_2_li, { "Length indicator", "m2ua.data_2_li", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_state, { "State", "m2ua.state", FT_UINT32, BASE_DEC, VALS(state_values), 0x0, "", HFILL } },
{ &hf_event, { "Event", "m2ua.event", FT_UINT32, BASE_DEC, VALS(event_values), 0x0, "", HFILL } },