diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/resolv/async_resolv.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/resolv/async_resolv.c b/src/resolv/async_resolv.c index 81adf098..00aed143 100644 --- a/src/resolv/async_resolv.c +++ b/src/resolv/async_resolv.c @@ -1046,6 +1046,14 @@ resolv_gethostbyname_dns_parse(struct gethostbyname_dns_state *state, ret = ENOMEM; goto fail; } + + /* The address list is NULL. This is probably a bug in + * c-ares, but we need to handle it gracefully. + */ + if (state->rhostent->addr_list == NULL) { + talloc_free(state->rhostent); + return ENOENT; + } } talloc_free(tmp_ctx); |