[Spice-commits] server/display-channel.c

Frediano Ziglio fziglio at kemper.freedesktop.org
Thu Sep 22 15:50:19 UTC 2016


 server/display-channel.c |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit c51203ab16418a834a57cfe99a7ca4135452debd
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Sun Sep 18 03:08:18 2016 +0100

    Small comment on structure checking
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Jonathon Jongsma <jjongsma at redhat.com>

diff --git a/server/display-channel.c b/server/display-channel.c
index 8b949a2..1547505 100644
--- a/server/display-channel.c
+++ b/server/display-channel.c
@@ -1985,6 +1985,8 @@ void display_channel_process_surface_cmd(DisplayChannel *display, RedSurfaceCmd
         }
         data = surface->u.surface_create.data;
         if (stride < 0) {
+            /* No need to worry about overflow here, command should already be validated
+             * when it is read, specifically red_get_surface_cmd */
             data -= (int32_t)(stride * (height - 1));
         }
         display_channel_create_surface(display, surface_id, surface->u.surface_create.width,


More information about the Spice-commits mailing list