mirror of
https://github.com/genodelabs/genode.git
synced 2025-03-22 03:55:26 +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
|
||||
*/
|
||||
void prepare_send(void * const data, size_t data_size,
|
||||
unsigned const name)
|
||||
unsigned long const name)
|
||||
{
|
||||
/* limit data size */
|
||||
if (data_size > _max_data_size()) {
|
||||
@ -205,7 +205,7 @@ class Genode::Message_tpl
|
||||
data_size = _max_data_size();
|
||||
}
|
||||
/* copy data */
|
||||
*(unsigned *)_data = name;
|
||||
*(unsigned long *)_data = name;
|
||||
void * const data_dst = (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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user