diff options
author | Anders Broman <anders.broman@ericsson.com> | 2005-12-16 07:18:52 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2005-12-16 07:18:52 +0000 |
commit | cdc5a9486410383f547e26c14210365da246e54b (patch) | |
tree | b0f7648489e8661131fd5545825b7644b214bb3c | |
parent | 8d05164bece975e5b78d00169020f83956052c5e (diff) | |
download | wireshark-cdc5a9486410383f547e26c14210365da246e54b.tar.gz wireshark-cdc5a9486410383f547e26c14210365da246e54b.tar.bz2 wireshark-cdc5a9486410383f547e26c14210365da246e54b.zip |
From Grame Lunt:
The new oid_resolv.c OID handling is more strict on what an OID is. It now requires the OID string representation to be a sequence of dotted integers - particularly when looking up an associated name.
The X.411 and DISP dissectors have [ab]used the OID handling to support the dissection of x.411 standard-extensions (which are indicated by a single
integer) and where the OID is sufficient by itself (disp). Have a look at x411.cnf and disp.cnf
Attached is a small patch to restore the previous functionality in the new handling. If this is something you don't wish to continue to support in the OID handling, then I'll look at alternate mechanisms.
Graeme
svn path=/trunk/; revision=16816
-rw-r--r-- | epan/oid_resolv.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/epan/oid_resolv.c b/epan/oid_resolv.c index 753097ecb7..73e530a92c 100644 --- a/epan/oid_resolv.c +++ b/epan/oid_resolv.c @@ -77,7 +77,11 @@ const gchar *get_oid_str_name(const gchar *oid_str) { bytes = g_byte_array_new(); res = oid_str_to_bytes(oid_str, bytes); - if (!res) return NULL; + if (!res) { + /* just try a direct lookup - this allows backward compatibility + with non-OIDs used for X.411 standard extensions and DISP initiators */ + return g_hash_table_lookup(oid_table, oid_str); + } name = get_oid_name(bytes->data, bytes->len); g_byte_array_free(bytes, TRUE); return name; |