Reviewed-by: Marek Olšák <marek.ol...@amd.com> Marek
On Mon, Jan 29, 2018 at 10:42 PM, Brian Paul <bri...@vmware.com> wrote: > get_value_size() returns -1 for an error. The similar check in > _mesa_GetUnsignedBytei_vEXT() is correct. > > Found by chance. There are apparently no Piglit tests which exercise > glGetUnsignedBytei_vEXT() or glGetUnsignedBytevEXT(). > --- > src/mesa/main/get.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c > index b41fdb2..04cab91 100644 > --- a/src/mesa/main/get.c > +++ b/src/mesa/main/get.c > @@ -2090,7 +2090,7 @@ _mesa_GetUnsignedBytevEXT(GLenum pname, GLubyte *data) > > d = find_value(func, pname, &p, &v); > size = get_value_size(d->type, &v); > - if (size >= 0) { > + if (size <= 0) { > _mesa_problem(ctx, "invalid value type in GetUnsignedBytevEXT()"); > } > > -- > 2.7.4 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev