mesa: check for invalid index on UUID glGet queries
This fixes the piglit test: spec/ext_semaphore/api-errors/usigned-byte-i-v-bad-value Signed-off-by: Andres Rodriguez <andresx7@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
@@ -2578,9 +2578,13 @@ find_value_indexed(const char *func, GLenum pname, GLuint index, union value *v)
|
||||
v->value_int = 1;
|
||||
return TYPE_INT;
|
||||
case GL_DRIVER_UUID_EXT:
|
||||
if (index >= 1)
|
||||
goto invalid_value;
|
||||
_mesa_get_driver_uuid(ctx, v->value_int_4);
|
||||
return TYPE_INT_4;
|
||||
case GL_DEVICE_UUID_EXT:
|
||||
if (index >= 1)
|
||||
goto invalid_value;
|
||||
_mesa_get_device_uuid(ctx, v->value_int_4);
|
||||
return TYPE_INT_4;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user