Commit b8b7a29b authored by Geoff Lang's avatar Geoff Lang Committed by Commit Bot

Validate before calling glDrawBuffers with the passthrough decoder.

BUG=1043460

Change-Id: Iceab4aa65cb50bbe3be706cdfdee1564b8158298
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2081517Reviewed-by: default avatarJonah Ryan-Davis (use @google.com) <jonahr@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#746025}
parent f5e43d72
......@@ -4691,6 +4691,11 @@ error::Error GLES2DecoderPassthroughImpl::DoDescheduleUntilFinishedCHROMIUM() {
error::Error GLES2DecoderPassthroughImpl::DoDrawBuffersEXT(
GLsizei count,
const volatile GLenum* bufs) {
if (!feature_info_->feature_flags().ext_draw_buffers &&
!feature_info_->gl_version_info().is_es3) {
return error::kUnknownCommand;
}
// Validate that count is non-negative before allocating a vector
if (count < 0) {
InsertError(GL_INVALID_VALUE, "count cannot be negative.");
......
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