On Tue, Apr 16, 2013 at 3:06 PM, Matt Turner <matts...@gmail.com> wrote: > On Tue, Apr 16, 2013 at 11:11 AM, Anuj Phogat <anuj.pho...@gmail.com> wrote: >> >> Signed-off-by: Anuj Phogat <anuj.pho...@gmail.com> >> --- >> src/mesa/drivers/dri/intel/intel_screen.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/src/mesa/drivers/dri/intel/intel_screen.c >> b/src/mesa/drivers/dri/intel/intel_screen.c >> index 16750f2..27b992c 100644 >> --- a/src/mesa/drivers/dri/intel/intel_screen.c >> +++ b/src/mesa/drivers/dri/intel/intel_screen.c >> @@ -707,6 +707,9 @@ intel_from_planar(__DRIimage *parent, int plane, void >> *loaderPrivate) >> stride = parent->strides[index]; >> >> image = intel_allocate_image(dri_format, loaderPrivate); >> + if (image == NULL) >> + return NULL; >> + >> if (offset + height * stride > parent->region->bo->size) { >> _mesa_warning(NULL, "intel_create_sub_image: subimage out of >> bounds"); >> free(image); >> -- >> 1.8.1.4 > > There is another place in the same file that the return value of > intel_allocate_image isn't checked. Should probably add a check there > while you're fixing this.
Yeah, there are 2 such places. They are listed under id 463, 464 in the static analysis tool. I'm not sure why they were not listed under 'to be fixed' issues. I'll update my patch by adding relevant checks. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev