Small comment on structure checking

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
Frediano Ziglio 2016-09-18 03:08:18 +01:00
parent a9d6b72959
commit c51203ab16

View File

@ -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,