Check getdns_dict_remove_name parameters

This commit is contained in:
Willem Toorop 2015-10-06 13:12:33 +02:00
parent f632ef8939
commit 820a657297
1 changed files with 3 additions and 0 deletions

View File

@ -1207,6 +1207,9 @@ getdns_dict_remove_name(getdns_dict *dict, const char *name)
{
const char *next;
struct getdns_dict_item *d;
if (!dict || !name)
return GETDNS_RETURN_INVALID_PARAMETER;
if (!(d = _find_dict_item(dict, name)))
return GETDNS_RETURN_NO_SUCH_DICT_NAME;