From Grame Lunt:
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 16 Dec 2005 07:18:52 +0000 (07:18 +0000)
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 16 Dec 2005 07:18:52 +0000 (07:18 +0000)
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

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16816 f5534014-38df-0310-8fa8-9805f1628bb7

epan/oid_resolv.c

index 753097ecb7fb29c2b7138a8d6842e79cbe729791..73e530a92ce9df441bc5f2a08a9fd328188ed115 100644 (file)
@@ -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;