mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-27 15:45:54 +00:00
char_device.c: fix call to spice_marshaller_add_ref with memory on stack
rhbz#862352
This commit is contained in:
parent
45a09e4113
commit
4cd4e7cf19
@ -816,12 +816,14 @@ void spice_char_device_wakeup(SpiceCharDeviceState *dev)
|
||||
|
||||
void spice_char_device_state_migrate_data_marshall_empty(SpiceMarshaller *m)
|
||||
{
|
||||
SpiceMigrateDataCharDevice mig_data;
|
||||
SpiceMigrateDataCharDevice *mig_data;
|
||||
|
||||
memset(&mig_data, 0, sizeof(mig_data));
|
||||
mig_data.version = SPICE_MIGRATE_DATA_CHAR_DEVICE_VERSION;
|
||||
mig_data.connected = FALSE;
|
||||
spice_marshaller_add_ref(m, (uint8_t *)&mig_data, sizeof(SpiceMigrateDataCharDevice));
|
||||
spice_debug(NULL);
|
||||
mig_data = (SpiceMigrateDataCharDevice *)spice_marshaller_reserve_space(m,
|
||||
sizeof(*mig_data));
|
||||
memset(mig_data, 0, sizeof(*mig_data));
|
||||
mig_data->version = SPICE_MIGRATE_DATA_CHAR_DEVICE_VERSION;
|
||||
mig_data->connected = FALSE;
|
||||
}
|
||||
|
||||
void spice_char_device_state_migrate_data_marshall(SpiceCharDeviceState *dev,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user