Commit 942e37a1 authored by Geoff Lang's avatar Geoff Lang Committed by Commit Bot

Fix incorrect buffer size DCHECK when copying scratch parameters.

Replace '<' with '<=', this was not found until recently because it
required that the result was being copied into the exact last element of
a much larger buffer.

BUG=874402
TBR=piman@chromium.org

Change-Id: Ib35552f331f0d9f1f1d19aa4914d1d14ec75ee2d
Reviewed-on: https://chromium-review.googlesource.com/c/1344214
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
Reviewed-by: default avatarGeoff Lang <geofflang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609874}
parent 93fb9b3c
...@@ -399,7 +399,7 @@ class GPU_GLES2_EXPORT GLES2DecoderPassthroughImpl : public GLES2Decoder { ...@@ -399,7 +399,7 @@ class GPU_GLES2_EXPORT GLES2DecoderPassthroughImpl : public GLES2Decoder {
} }
// Copy into the destination // Copy into the destination
DCHECK(*length < bufsize); DCHECK(*length <= bufsize);
std::copy(scratch_params, scratch_params + *length, params); std::copy(scratch_params, scratch_params + *length, params);
return error::kNoError; return error::kNoError;
......
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