mesa: use default params for clearbuffer functions
this might otherwise pull in user-specified params from the unpack buffer and access arbitrary data cc: mesa-stable Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32945>
This commit is contained in:

committed by
Marge Bot

parent
92d6351d02
commit
a5c3c452b8
@@ -995,10 +995,11 @@ convert_clear_buffer_data(struct gl_context *ctx,
|
||||
const GLvoid *data, const char *caller)
|
||||
{
|
||||
GLenum internalformatBase = _mesa_get_format_base_format(internalformat);
|
||||
struct gl_pixelstore_attrib packing = {.Alignment = 1};
|
||||
|
||||
if (_mesa_texstore(ctx, 1, internalformatBase, internalformat,
|
||||
0, &clearValue, 1, 1, 1,
|
||||
format, type, data, &ctx->Unpack)) {
|
||||
format, type, data, &packing)) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
|
Reference in New Issue
Block a user