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

Lim Siew Hoon siew.hoon.lim at intel.com
Fri Nov 13 05:05:33 PST 2015


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>
---
 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;
-- 
2.1.0



More information about the Libva mailing list