[Bug 97321] Query INFO_LOG_LENGTH for empty info log should return 0

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Aug 18 08:29:49 UTC 2016


--- Comment #8 from Ian Romanick <idr at freedesktop.org> ---
(In reply to Qiankun Miao from comment #7)
> (In reply to Ian Romanick from comment #6)
> > The spec also says, "If pname is INFO_LOG_LENGTH , the length of the info
> > log, including a null terminator, is returned."  If this query returns 0,
> > then glGetProgramInfoLog CANNOT write anything to the buffer... and it
> > currently does.
> I think returned value of GetProgramiv() can be 0. It doesn't affect the
> real length of the info log buffer. Driver can still return a null
> terminator string.

That is absolutely false.  The whole point of the
glGetProgramiv(GL_INFO_LOG_LENGTH) query is so that the application can
allocate a buffer to store the data that will be returned by
glGetProgramInfoLog.  Having those mismatch, under any circumstances, is wrong
to the point that it could create a buffer overrun security problem.

You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20160818/064736b9/attachment.html>

More information about the intel-3d-bugs mailing list