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>
(cherry picked from commit a5c3c452b8
)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33113>
This commit is contained in:

committed by
Dylan Baker

parent
db73e1121d
commit
b86b4b85e4
@@ -1804,7 +1804,7 @@
|
||||
"description": "mesa: use default params for clearbuffer functions",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
@@ -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