Hi Haihao, This patch reviewed by Yakui, same code changed as "[Libva] [PATCH Intel-VA] Add if statement checking for obj_context that possible assign to NULL value." I just updated the commit message to proper sentence as what suggest by Emil Velikov. Thanks for Yakui to review it.
...siewhoon > -----Original Message----- > From: Libva [mailto:[email protected]] On Behalf Of Lim > Siew Hoon > Sent: Wednesday, September 30, 2015 7:07 PM > To: [email protected] > Subject: [Libva] [PATCH Intel-VA] Avoid NULL ptr deref in > i965_decoder_wrapper_picture() > > Signed-off-by: Lim Siew Hoon <[email protected]> > Reviewed-by: Zhao Yakui <[email protected]> > --- > 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 > > _______________________________________________ > Libva mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/libva _______________________________________________ Libva mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libva
