> -----Original Message----- > From: mesa-dev [mailto:mesa-dev-boun...@lists.freedesktop.org] On > Behalf Of Matt Turner > Sent: Tuesday, June 23, 2015 11:05 PM > To: Marta Lofstedt > Cc: mesa-dev@lists.freedesktop.org > Subject: Re: [Mesa-dev] [PATCH] mesa : NULL check InfoLog > > On Tue, Jun 23, 2015 at 4:03 AM, Marta Lofstedt > <marta.lofst...@linux.intel.com> wrote: > > From: Marta Lofstedt <marta.lofst...@intel.com> > > > > When a program is compiled, but linking failed the > > sh->InfoLog could be NULL. This is expoloited > > by OpenGL ES 3.1 conformance tests. > > > > Signed-off-by: Marta Lofstedt <marta.lofst...@intel.com> > > --- > > src/mesa/main/shaderapi.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c > > index a4296ad..c783c69 100644 > > --- a/src/mesa/main/shaderapi.c > > +++ b/src/mesa/main/shaderapi.c > > @@ -1920,8 +1920,8 @@ _mesa_create_shader_program(struct > gl_context* ctx, GLboolean separate, > > } > > #endif > > } > > - > > - ralloc_strcat(&shProg->InfoLog, sh->InfoLog); > > + if (sh->InfoLog) > > + ralloc_strcat(&shProg->InfoLog, sh->InfoLog); > > Wrong indentation on this line. There is a strange mix of tabs and space indentation in this file. I hope it is Correct of me to use space indentation in my V2. > > Surely just not writing to the info log isn't the right fix? If it's null, > shouldn't > we instead ralloc_strdup() the string? I ralloc_strdup the shProg->InfoLog in my V2.
> _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev ---------------------------------------------------------------------- Intel Sweden AB Registered Office: Knarrarnasgatan 15, 164 40 Kista, Stockholm, Sweden Registration Number: 556189-6027 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev