[Beignet] [PATCH 1/2] fix global variable out of boundary writing in libocl.
Yang, Rong R
rong.r.yang at intel.com
Wed Jun 17 20:33:52 PDT 2015
Pushed.
> -----Original Message-----
> From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of
> Zhigang Gong
> Sent: Monday, June 15, 2015 10:18
> To: Luo, Xionghu
> Cc: beignet at lists.freedesktop.org
> Subject: Re: [Beignet] [PATCH 1/2] fix global variable out of boundary writing
> in libocl.
>
> Nice catch, LGTM, thanks.
>
> On Fri, Jun 12, 2015 at 09:10:00AM +0800, xionghu.luo at intel.com wrote:
> > From: Luo Xionghu <xionghu.luo at intel.com>
> >
> > need minus one when fill '\0' to sizeof char type array.
> >
> > Signed-off-by: Luo Xionghu <xionghu.luo at intel.com>
> > ---
> > src/cl_extensions.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/cl_extensions.c b/src/cl_extensions.c index
> > adcf82e..6b82b96 100644
> > --- a/src/cl_extensions.c
> > +++ b/src/cl_extensions.c
> > @@ -69,7 +69,7 @@ process_extension_str(cl_extensions_t *extensions)
> > int str_offset = 0;
> > int id;
> >
> > - extensions->ext_str[str_max] = '\0';
> > + extensions->ext_str[str_max-1] = '\0';
> >
> > for(id = 0; id < cl_khr_extension_id_max; id++)
> > {
> > --
> > 1.9.1
> >
> > _______________________________________________
> > Beignet mailing list
> > Beignet at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/beignet
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list