diff options
author | Andres Rodriguez <[email protected]> | 2017-12-21 19:18:59 -0500 |
---|---|---|
committer | Andres Rodriguez <[email protected]> | 2018-01-30 15:13:49 -0500 |
commit | 0a89784bcc988d602bbe8b310aca8c54ef03d954 (patch) | |
tree | b7c5932a63e3f4bd87c22ebee02c6126ae2e6b92 /src/mesa/main/get.c | |
parent | 566ed727a4a56d0b6e2f638734f501beea0bd0c0 (diff) |
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 <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/main/get.c')
-rw-r--r-- | src/mesa/main/get.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 1e4b8f6f0bc..cf9a2f66d2f 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -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; } |