Parse IP Addresses from JSON-like strings to allow better IPv6 address handling

This commit is contained in:
uzlonewolf 2021-12-03 16:05:36 -08:00
parent 1f2aa585fc
commit 2964c4ee96
No known key found for this signature in database
GPG Key ID: BE9A745E602A390E
1 changed files with 5 additions and 0 deletions

View File

@ -1612,6 +1612,11 @@ static int _jsmn_get_item(struct mem_funcs *mf, const char *js, jsmntok_t *t,
if (t->end < t->start)
*r = GETDNS_RETURN_GENERIC_ERROR;
else if (_jsmn_get_ipdict(mf, js, t, &item->data.dict)) {
item->dtype = t_dict;
*r = GETDNS_RETURN_GOOD;
return 1;
}
else if (!(item->data.bindata =
GETDNS_MALLOC(*mf, getdns_bindata)))
*r = GETDNS_RETURN_MEMORY_ERROR;