packet-dcerpc: let dcerpc_get_proto_name() handle unknown uuids
authorStefan Metzmacher <metze@samba.org>
Wed, 4 Nov 2015 22:48:59 +0000 (23:48 +0100)
committerMichael Mann <mmann78@netscape.net>
Thu, 5 Nov 2015 02:53:41 +0000 (02:53 +0000)
This fixes a regression in commit e0e574d16748313dd8903f886d1af9eb0821fee7.

Change-Id: I447001a84e17a76ec77c48f736bbfcd8cc6324a1
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-on: https://code.wireshark.org/review/11574
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
epan/dissectors/packet-dcerpc.c

index 149e378c524f0bf9d6d0d7025ea46d11c2824bfa..c6cbdc5de40906ca4b8985f6ac3ace4329fc735f 100644 (file)
@@ -1577,12 +1577,18 @@ dcerpc_init_uuid(int proto, int ett, e_guid_t *uuid, guint16 ver,
 const char *
 dcerpc_get_proto_name(e_guid_t *uuid, guint16 ver)
 {
 const char *
 dcerpc_get_proto_name(e_guid_t *uuid, guint16 ver)
 {
+    dissector_handle_t handle;
     guid_key    key;
 
     key.guid = *uuid;
     key.ver = ver;
 
     guid_key    key;
 
     key.guid = *uuid;
     key.ver = ver;
 
-    return dissector_handle_get_short_name(dissector_get_guid_handle(uuid_dissector_table, &key));
+    handle = dissector_get_guid_handle(uuid_dissector_table, &key);
+    if (handle == NULL) {
+        return NULL;
+    }
+
+    return dissector_handle_get_short_name(handle);
 }
 
 /* Function to find the opnum hf-field of a registered protocol
 }
 
 /* Function to find the opnum hf-field of a registered protocol