Issue found with static analysis

This commit is contained in:
Willem Toorop 2018-12-13 15:24:27 +01:00
parent 154f98e321
commit eecc18703a
1 changed files with 2 additions and 2 deletions

View File

@ -4637,9 +4637,9 @@ getdns_context_get_dns_transport_list(const getdns_context *context,
}
// use normal malloc here so users can do normal free
*transports = malloc(
context->dns_transport_count * sizeof(getdns_transport_t));
context->dns_transport_count * sizeof(getdns_transport_list_t));
memcpy(*transports, context->dns_transports,
context->dns_transport_count * sizeof(getdns_transport_t));
context->dns_transport_count * sizeof(getdns_transport_list_t));
return GETDNS_RETURN_GOOD;
}