Require that field names contain only alphanumerics, "-", "_", and ".".

Fix the names that contained other characters.

svn path=/trunk/; revision=8959
This commit is contained in:
Guy Harris 2003-11-13 23:38:33 +00:00
parent ca5235bc35
commit 624fe0ec15
5 changed files with 18 additions and 9 deletions

View File

@ -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

View File

@ -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,

View File

@ -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 }},

View File

@ -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 }},

View File

@ -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 } },