diff options
Diffstat (limited to 'epan')
-rw-r--r-- | epan/asm_utils.c | 2 | ||||
-rw-r--r-- | epan/proto.c | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/epan/asm_utils.c b/epan/asm_utils.c index afc0b2c3a8..e02a737850 100644 --- a/epan/asm_utils.c +++ b/epan/asm_utils.c @@ -47,7 +47,7 @@ wrs_str_equal(gconstpointer a, gconstpointer b) } guchar -wrs_check_charset(const guchar table[256], const char *str) +wrs_check_charset(const guint8 table[256], const char *str) { const char *p = str; guchar c; diff --git a/epan/proto.c b/epan/proto.c index 707dc0d3bf..2d166ccb58 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -5287,7 +5287,7 @@ proto_unregister_field (const int parent, gint hf_id) /* chars allowed in field abbrev */ static -const guchar fld_abbrev_chars[256] = { +const guint8 fld_abbrev_chars[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00-0x0F */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10-0x1F */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, /* 0x20-0x2F '-', '.' */ @@ -5645,7 +5645,10 @@ proto_register_field_init(header_field_info *hfinfo, const int parent) * it must contain only alphanumerics, '-', "_", and ".". */ c = wrs_check_charset(fld_abbrev_chars, hfinfo->abbrev); if (c) { - fprintf(stderr, "Invalid character '%c' in filter name '%s'\n", c, hfinfo->abbrev); + if (g_ascii_isprint(c)) + fprintf(stderr, "Invalid character '%c' in filter name '%s'\n", c, hfinfo->abbrev); + else + fprintf(stderr, "Invalid byte \\%03o in filter name '%s'\n", c, hfinfo->abbrev); DISSECTOR_ASSERT_NOT_REACHED(); } |