mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-22 09:12:13 -05:00
LibWeb/WebGL2: Correctly handle offsets in uniform(Matrix) functions
This commit is contained in:
parent
63b792c205
commit
2983ad10bc
Notes:
github-actions[bot]
2025-01-08 15:00:44 +00:00
Author: https://github.com/Lubrsi Commit: https://github.com/LadybirdBrowser/ladybird/commit/2983ad10bc2 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2943 Reviewed-by: https://github.com/kalenikaliaksandr
1 changed files with 14 additions and 10 deletions
|
@ -923,14 +923,16 @@ public:
|
|||
|
||||
if (webgl_version == 2) {
|
||||
function_impl_generator.append(R"~~~(
|
||||
if (src_offset + src_length > (count * matrix_size)) {
|
||||
set_error(GL_INVALID_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
raw_data += src_offset;
|
||||
if (src_length == 0) {
|
||||
count -= src_offset;
|
||||
}
|
||||
|
||||
if (src_offset + src_length <= count) {
|
||||
set_error(GL_INVALID_VALUE);
|
||||
return;
|
||||
} else {
|
||||
count = src_length;
|
||||
}
|
||||
)~~~");
|
||||
}
|
||||
|
@ -975,14 +977,16 @@ public:
|
|||
|
||||
if (webgl_version == 2) {
|
||||
function_impl_generator.append(R"~~~(
|
||||
if (src_offset + src_length > count) {
|
||||
set_error(GL_INVALID_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
data += src_offset;
|
||||
if (src_length == 0) {
|
||||
count -= src_offset;
|
||||
}
|
||||
|
||||
if (src_offset + src_length <= count) {
|
||||
set_error(GL_INVALID_VALUE);
|
||||
return;
|
||||
} else {
|
||||
count = src_length;
|
||||
}
|
||||
)~~~");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue