summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLim Siew Hoon <siew.hoon.lim@intel.com>2015-11-13 21:05:33 +0800
committerZhao, Yakui <yakui.zhao@intel.com>2015-11-17 09:15:29 +0800
commit7deaf55d3f927e32e0b2280601dae106c7b9e3d8 (patch)
tree292b22290c103f10b53e375ea8d357f6ac615dd2 /src
parenta524f65a9e598857bc9e3900fb43c860fff247cc (diff)
Fix the segmentation fault causing by NULL buffer object
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>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/i965_post_processing.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/i965_post_processing.c b/src/i965_post_processing.c
index ea3d350..07483f8 100755
--- a/src/i965_post_processing.c
+++ b/src/i965_post_processing.c
@@ -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;