Pushed.

> -----Original Message-----
> From: Beignet [mailto:[email protected]] On Behalf Of
> Zhigang Gong
> Sent: Monday, June 15, 2015 10:18
> To: Luo, Xionghu
> Cc: [email protected]
> 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, [email protected] wrote:
> > From: Luo Xionghu <[email protected]>
> >
> > need minus one when fill '\0' to sizeof char type array.
> >
> > Signed-off-by: Luo Xionghu <[email protected]>
> > ---
> >  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
> > [email protected]
> > http://lists.freedesktop.org/mailman/listinfo/beignet
> _______________________________________________
> Beignet mailing list
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/beignet
_______________________________________________
Beignet mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/beignet

Reply via email to