Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_extensions.cc

Issue 2892663004: Fix signed integer overflow in gles2_cmd_decoder_unittest_extensions.cc (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_decoder_unittest_extensions.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_extensions.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_extensions.cc
index bb398143f343adff1907378634777d101a1a0420..7e080f100052500614818a4edfd522f53702bc67 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_extensions.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_extensions.cc
@@ -589,7 +589,7 @@ TEST_P(GLES2DecoderTestWithCHROMIUMPathRendering, GenDeletePaths) {
EXPECT_EQ(error::kNoError, ExecuteCmd(delete_cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
- delete_cmd.Init(std::numeric_limits<GLsizei>::max() + 1,
+ delete_cmd.Init(static_cast<GLuint>(std::numeric_limits<GLsizei>::max()) + 1,
Nico 2017/05/18 17:40:23 Isn't GLsizei an unsigned type already? And can't
hans 2017/05/18 17:48:20 No, it's signed.
std::numeric_limits<GLsizei>::max());
EXPECT_EQ(error::kNoError, ExecuteCmd(delete_cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -775,7 +775,7 @@ TEST_P(GLES2DecoderTestWithCHROMIUMPathRendering,
EXPECT_EQ(GL_NO_ERROR, GetGLError());
// Too big range causes client id to wrap, connection error.
- gen_cmd.Init(std::numeric_limits<GLsizei>::max() + 3,
+ gen_cmd.Init(static_cast<GLuint>(std::numeric_limits<GLsizei>::max()) + 3,
std::numeric_limits<GLsizei>::max());
EXPECT_EQ(error::kInvalidArguments, ExecuteCmd(gen_cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
@@ -819,7 +819,7 @@ TEST_P(GLES2DecoderTestWithCHROMIUMPathRendering,
EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
// Too big range causes client id to wrap, connection error.
- delete_cmd.Init(std::numeric_limits<GLsizei>::max() + 3,
+ delete_cmd.Init(static_cast<GLuint>(std::numeric_limits<GLsizei>::max()) + 3,
std::numeric_limits<GLsizei>::max());
EXPECT_EQ(error::kInvalidArguments, ExecuteCmd(delete_cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698