[Libva] [PATCH Intel-VA] Avoid NULL ptr deref in i965_decoder_wrapper_picture()
Lim Siew Hoon
siew.hoon.lim at intel.com
Wed Sep 30 04:07:13 PDT 2015
Signed-off-by: Lim Siew Hoon <siew.hoon.lim at intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao at intel.com>
---
src/i965_drv_video.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index 9bbd67f..cb950e1 100644
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -2813,6 +2813,9 @@ i965_decoder_wrapper_picture(VADriverContextP ctx,
VADriverContextP pdrvctx;
struct object_buffer *obj_buffer;
+ if (obj_context == NULL)
+ return VA_STATUS_ERROR_INVALID_CONTEXT;
+
/* When it is not wrapped context, continue the normal flowchart */
if (obj_context->wrapper_context == VA_INVALID_ID)
return vaStatus;
--
2.1.0
More information about the Libva
mailing list