[Spice-devel] [PATCH spice-server 2/2] Use constant variables for image operations
Frediano Ziglio
fziglio at redhat.com
Wed Nov 8 14:18:53 UTC 2017
This reduce the attack surface moving some data into read-only
sections.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
server/display-channel.c | 2 +-
server/image-cache.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/server/display-channel.c b/server/display-channel.c
index e91265de..ad346c93 100644
--- a/server/display-channel.c
+++ b/server/display-channel.c
@@ -2262,7 +2262,7 @@ static void drawables_init(DisplayChannel *display);
static void
display_channel_init(DisplayChannel *self)
{
- static SpiceImageSurfacesOps image_surfaces_ops = {
+ static const SpiceImageSurfacesOps image_surfaces_ops = {
image_surfaces_get,
};
diff --git a/server/image-cache.c b/server/image-cache.c
index 3493ba1f..bc62938e 100644
--- a/server/image-cache.c
+++ b/server/image-cache.c
@@ -115,7 +115,7 @@ static pixman_image_t *image_cache_get(SpiceImageCache *spice_cache, uint64_t id
void image_cache_init(ImageCache *cache)
{
- static SpiceImageCacheOps image_cache_ops = {
+ static const SpiceImageCacheOps image_cache_ops = {
image_cache_put,
image_cache_get,
};
--
2.13.6
More information about the Spice-devel
mailing list