LGTM, pushed, thanks.
> -----Original Message----- > From: Beignet [mailto:[email protected]] On Behalf Of > Jan Vesely > Sent: Friday, April 29, 2016 10:43 > To: [email protected] > Subject: [Beignet] [PATCH] cl_api; Check image origin and region for NULL > > Signed-off-by: Jan Vesely <[email protected]> > --- > src/cl_utils.h | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/src/cl_utils.h b/src/cl_utils.h index 0934d5f..2926611 100644 > --- a/src/cl_utils.h > +++ b/src/cl_utils.h > @@ -169,6 +169,11 @@ IMAGE = cl_mem_image(MEM); > \ > const size_t *REGION; \ > size_t REGION ##_REC[3]; \ > do { \ > + if (PREGION == NULL) \ > + { \ > + err = CL_INVALID_VALUE; \ > + goto error; \ > + } \ > if (IMAGE->image_type == CL_MEM_OBJECT_IMAGE1D_ARRAY) { \ > REGION ##_REC[0] = PREGION[0]; \ > REGION ##_REC[1] = 1; \ > @@ -188,6 +193,11 @@ do { > \ > const size_t *REGION; \ > size_t REGION ##_REC[3]; \ > do { \ > + if (PREGION == NULL) \ > + { \ > + err = CL_INVALID_VALUE; \ > + goto error; \ > + } \ > if (IMAGE->image_type == CL_MEM_OBJECT_IMAGE1D_ARRAY) { \ > REGION ##_REC[0] = PREGION[0]; \ > REGION ##_REC[1] = 0; \ > -- > 2.7.4 > > _______________________________________________ > Beignet mailing list > [email protected] > https://lists.freedesktop.org/mailman/listinfo/beignet _______________________________________________ Beignet mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/beignet
