[Libva] [PATCH 1/2] Fix the segmentation fault causing by NULL buffer object

Zhao Yakui yakui.zhao at intel.com
Sun Nov 15 16:44:58 PST 2015


On 11/13/2015 09:05 PM, Lim Siew Hoon wrote:
> Add if checking for dst_obj_surface->bo is NULL in
> i965_proc_picture_fast function.
>
> https://bugs.freedesktop.org/show_bug.cgi?id=92811
>
> Signed-off-by: Lim Siew Hoon<siew.hoon.lim at intel.com>

This patch looks good to me.

Thanks.
    Yakui

> ---
>   src/i965_post_processing.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/src/i965_post_processing.c b/src/i965_post_processing.c
> index 0d145d8..c2ec149 100755
> --- a/src/i965_post_processing.c
> +++ b/src/i965_post_processing.c
> @@ -5714,6 +5714,9 @@ i965_proc_picture_fast(VADriverContextP ctx,
>       if (!dst_obj_surface)
>           return VA_STATUS_ERROR_INVALID_SURFACE;
>
> +    if (!dst_obj_surface->bo)
> +        return VA_STATUS_ERROR_UNIMPLEMENTED;
> +
>       if (dst_obj_surface->fourcc&&
>           dst_obj_surface->fourcc != src_obj_surface->fourcc)
>           pp_ops |= PP_OP_CHANGE_FORMAT;



More information about the Libva mailing list