Skip to content

Commit

Permalink
Fix the segmentation fault causing by NULL buffer object
Browse files Browse the repository at this point in the history
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@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
  • Loading branch information
SiewHoon authored and yakuizhao committed Nov 17, 2015
1 parent a524f65 commit 7deaf55
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/i965_post_processing.c
Original file line number Diff line number Diff line change
Expand Up @@ -5722,6 +5722,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;
Expand Down

0 comments on commit 7deaf55

Please sign in to comment.