LGTM, test pass, thanks. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Zhigang Gong Sent: Tuesday, September 17, 2013 5:56 PM To: [email protected] Subject: Re: [Beignet] [PATCH 1/2] Runtime: fix a null reference bug.
Please ignore the previous version and use the attached version instead. As it's conflict with one of Rong's patch. On Fri, Sep 13, 2013 at 04:55:22PM +0800, Zhigang Gong wrote: > The image_slice_pitch may be a null pointer. Need to check before > refer it. > > Signed-off-by: Zhigang Gong <[email protected]> > --- > src/cl_api.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/cl_api.c b/src/cl_api.c index 7078118..f194760 100644 > --- a/src/cl_api.c > +++ b/src/cl_api.c > @@ -2175,7 +2175,8 @@ clEnqueueMapImage(cl_command_queue command_queue, > data->origin[0] = origin[0]; data->origin[1] = origin[1]; > data->origin[2] = origin[2]; > data->region[0] = region[0]; data->region[1] = region[1]; > data->region[2] = region[2]; > data->row_pitch = *image_row_pitch; > - data->slice_pitch = *image_slice_pitch; > + if (image_slice_pitch) > + data->slice_pitch = *image_slice_pitch; > data->ptr = ptr; > data->offset = offset; > > -- > 1.7.9.5 > > _______________________________________________ > Beignet mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/beignet _______________________________________________ Beignet mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/beignet
