Skip to content

Commit

Permalink
[M90-LTS] Fix multidraw validation drawcount + offset out of bounds
Browse files Browse the repository at this point in the history
(cherry picked from commit 7d0a12c)

Bug: 1219886
Change-Id: I8a84664150758370d9a77ee22ac5549bead0e37e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2977850
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#895423}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3041457
Reviewed-by: Jana Grill <janagrill@google.com>
Owners-Override: Jana Grill <janagrill@google.com>
Commit-Queue: Roger Felipe Zanoni da Silva <rzanoni@google.com>
Cr-Commit-Position: refs/branch-heads/4430@{#1542}
Cr-Branched-From: e5ce7dc-refs/heads/master@{#857950}
  • Loading branch information
shrekshao authored and Chromium LUCI CQ committed Jul 27, 2021
1 parent 62ba4b5 commit 0cd64b3
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ bool WebGLMultiDrawCommon::ValidateArray(WebGLExtensionScopedContext* scoped,
outOfBoundsDescription);
return false;
}
if (static_cast<uint64_t>(drawcount) + offset > size) {
scoped->Context()->SynthesizeGLError(GL_INVALID_OPERATION, function_name,
"drawcount plus offset out of bounds");
return false;
}
return true;
}

Expand Down

0 comments on commit 0cd64b3

Please sign in to comment.