mirror of
https://github.com/genodelabs/genode.git
synced 2025-03-23 04:25:21 +00:00
hw_x86_64: Adjust parameter type of Message_tpl::prepare_send
Change the type of the local name parameter from unsigned to unsigned long. Otherwise only 4 bytes are copied on x86_64, leaving 4 bytes of garbage.
This commit is contained in:
parent
16a51b317a
commit
147b1ec2b1
@ -197,7 +197,7 @@ class Genode::Message_tpl
|
|||||||
* \param name local name that shall be the first payload word
|
* \param name local name that shall be the first payload word
|
||||||
*/
|
*/
|
||||||
void prepare_send(void * const data, size_t data_size,
|
void prepare_send(void * const data, size_t data_size,
|
||||||
unsigned const name)
|
unsigned long const name)
|
||||||
{
|
{
|
||||||
/* limit data size */
|
/* limit data size */
|
||||||
if (data_size > _max_data_size()) {
|
if (data_size > _max_data_size()) {
|
||||||
@ -205,7 +205,7 @@ class Genode::Message_tpl
|
|||||||
data_size = _max_data_size();
|
data_size = _max_data_size();
|
||||||
}
|
}
|
||||||
/* copy data */
|
/* copy data */
|
||||||
*(unsigned *)_data = name;
|
*(unsigned long *)_data = name;
|
||||||
void * const data_dst = (void *)((addr_t)_data + sizeof(name));
|
void * const data_dst = (void *)((addr_t)_data + sizeof(name));
|
||||||
void * const data_src = (void *)((addr_t)data + sizeof(name));
|
void * const data_src = (void *)((addr_t)data + sizeof(name));
|
||||||
memcpy(data_dst, data_src, data_size - sizeof(name));
|
memcpy(data_dst, data_src, data_size - sizeof(name));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user