Skip to content
Browse files

capability: handle NULL passed to capability_get().

  • Loading branch information...
1 parent ce4fa44 commit d7e4ed772f3b98e7c95bac8bb3775df9adbcee11 @kaniini kaniini committed
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/capability.c
View
2 src/capability.c
@@ -46,6 +46,8 @@ capability_get(struct CapabilityIndex *idx, const char *cap)
struct CapabilityEntry *entry;
s_assert(idx != NULL);
+ if (cap == NULL)
+ return 0;
entry = irc_dictionary_retrieve(idx->cap_dict, cap);
if (entry != NULL && !(entry->flags & CAP_ORPHANED))

0 comments on commit d7e4ed7

Please sign in to comment.
Something went wrong with that request. Please try again.