fixed host conversion length check
This commit is contained in:
@@ -428,7 +428,7 @@ static void receive_messages(private_kernel_interface_t *this)
|
|||||||
static void host2xfrm(host_t *host, xfrm_address_t *xfrm)
|
static void host2xfrm(host_t *host, xfrm_address_t *xfrm)
|
||||||
{
|
{
|
||||||
chunk_t chunk = host->get_address(host);
|
chunk_t chunk = host->get_address(host);
|
||||||
memcpy(xfrm, chunk.ptr, max(chunk.len, sizeof(xfrm_address_t)));
|
memcpy(xfrm, chunk.ptr, min(chunk.len, sizeof(xfrm_address_t)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user