mesa: check for bufSize > 0 in _mesa_GetSynciv()
authorBrian Paul <brianp@vmware.com>
Sat, 14 Sep 2013 16:09:24 +0000 (10:09 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 1 Oct 2013 16:10:01 +0000 (10:10 -0600)
commit6659131be3bde0505a85e3a7d27382b273822bee
tree6ab95153af4ff5a022262d893b8ba16851569c91
parent755602df12cab123b8927e8d71b199b73e48b71b
mesa: check for bufSize > 0 in _mesa_GetSynciv()

The spec doesn't say GL_INVALID_VALUE should be raised for bufSize <= 0.
In any case, memcpy(len < 0) will lead to a crash, so don't allow it.

CC: "9.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/main/syncobj.c