[Spice-devel] [PATCH] server/red_worker: handle_dev_update_area: fail if invalid area
Hans de Goede
hdegoede at redhat.com
Sun Jul 29 03:14:21 PDT 2012
ACK.
On 07/29/2012 11:54 AM, Alon Levy wrote:
> ---
> server/red_worker.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/server/red_worker.c b/server/red_worker.c
> index 9009462..eb21208 100644
> --- a/server/red_worker.c
> +++ b/server/red_worker.c
> @@ -4589,6 +4589,12 @@ static void red_update_area(RedWorker *worker, const SpiceRect *area, int surfac
> #endif
> spice_debug("surface %d: area ==>", surface_id);
> rect_debug(area);
> +
> + spice_return_if_fail(surface_id >= 0 && surface_id < NUM_SURFACES);
> + spice_return_if_fail(area);
> + spice_return_if_fail(area->left >= 0 && area->top >= 0 &&
> + area->left < area->right && area->top < area->bottom);
> +
> surface = &worker->surfaces[surface_id];
>
> last = NULL;
>
More information about the Spice-devel
mailing list