OSDN Git Service

mesa: add missing error checks in _mesa_GetObject[Ptr]Label()
authorBrian Paul <brianp@vmware.com>
Sat, 14 Sep 2013 15:59:18 +0000 (09:59 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 1 Oct 2013 16:10:01 +0000 (10:10 -0600)
commit79a03068cdde14c491894d44ee713ab5d08a9aca
tree12bfa3ea4ac9f08dff67674af76b20170df5af58
parent69daf335a08934057ef6378b4bac6ca225a461dc
mesa: add missing error checks in _mesa_GetObject[Ptr]Label()

Error checking bufSize isn't mentioned in the spec, but it is in the
man pages.  However, I believe the man page is incorrect.  Typically,
GL functions that take GLsizei parameters check that they're positive
or non-negative.  Negative values don't make sense here.

A spec bug has been filed with Khronos/ARB.

v2: check for negative values, not <= 0.
src/mesa/main/objectlabel.c