Commit 901b77d2 authored by Marc-André Lureau's avatar Marc-André Lureau Committed by Dave Airlie

renderer: validate desc

Fix found thanks to american fuzzy lop.
Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
parent 04390599
......@@ -1642,6 +1642,10 @@ int vrend_create_vertex_elements_state(struct vrend_context *ctx,
memcpy(&v->elements[i].base, &elements[i], sizeof(struct pipe_vertex_element));
desc = util_format_description(elements[i].src_format);
if (!desc) {
FREE(v);
return EINVAL;
}
type = GL_FALSE;
if (desc->channel[0].type == UTIL_FORMAT_TYPE_FLOAT) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment