summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYonit Halperin <yhalperi@redhat.com>2012-11-13 12:19:32 -0500
committerYonit Halperin <yhalperi@redhat.com>2012-11-26 11:08:10 -0500
commitd8bad0f999da6ccb4aebcc0763a46b2c0624a5a5 (patch)
tree1f5bf086a86dec34df4b39c4bbd3147f2e63d0f0
parentea97fbb6296ae5f6938f6319c7c07bae5b319739 (diff)
downloadspice-d8bad0f999da6ccb4aebcc0763a46b2c0624a5a5.tar.gz
spice-d8bad0f999da6ccb4aebcc0763a46b2c0624a5a5.tar.xz
spice-d8bad0f999da6ccb4aebcc0763a46b2c0624a5a5.zip
red_worker.c: fix marshalling of migration data
fix calling spice_marhsaller_add_ref with memory on stack
-rw-r--r--server/red_worker.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/server/red_worker.c b/server/red_worker.c
index 18ac949a..092d45cc 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -8433,7 +8433,7 @@ static void display_channel_marshall_migrate_data_surfaces(DisplayChannelClient
*num_surfaces_created = 0;
for (i = 0; i < NUM_SURFACES; i++) {
SpiceRect lossy_rect;
- SpiceMigrateDataRect lossy_rect_marshall;
+
if (!dcc->surface_client_created[i]) {
continue;
}
@@ -8444,11 +8444,10 @@ static void display_channel_marshall_migrate_data_surfaces(DisplayChannelClient
continue;
}
region_extents(&dcc->surface_client_lossy_region[i], &lossy_rect);
- lossy_rect_marshall.left = lossy_rect.left;
- lossy_rect_marshall.top = lossy_rect.top;
- lossy_rect_marshall.right = lossy_rect.right;
- lossy_rect_marshall.bottom = lossy_rect.bottom;
- spice_marshaller_add_ref(m2, (uint8_t *)&lossy_rect_marshall, sizeof(lossy_rect_marshall));
+ spice_marshaller_add_int32(m2, lossy_rect.left);
+ spice_marshaller_add_int32(m2, lossy_rect.top);
+ spice_marshaller_add_int32(m2, lossy_rect.right);
+ spice_marshaller_add_int32(m2, lossy_rect.bottom);
}
}