aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2011-03-29 11:09:59 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2011-03-29 11:09:59 +0000
commit9e5a9baddae0199db81b6a2ebdba5eb5cde26114 (patch)
tree4e0e30534dd272a712f1fb6da0d75715ff7872b4 /epan/proto.c
parentf7c84ad094500acc357be3c9b725243795213d5e (diff)
Guard against NULL return from find_protocol_by_id().
svn path=/trunk/; revision=36393
Diffstat (limited to 'epan/proto.c')
-rw-r--r--epan/proto.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/epan/proto.c b/epan/proto.c
index 7858a730b2..f5f8092c52 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -4478,6 +4478,9 @@ proto_get_protocol_name(const int proto_id)
protocol_t *protocol;
protocol = find_protocol_by_id(proto_id);
+
+ if (protocol == NULL)
+ return NULL;
return protocol->name;
}