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

Unified Diff: ipc/ipc_fuzzing_tests.cc

Issue 1331673002: ipc: Convert k(u)int*max types from basictypes.h to std::numeric_limits variants. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix win? Created 5 years, 3 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 | « ipc/ipc_channel.h ('k') | ipc/ipc_message.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_fuzzing_tests.cc
diff --git a/ipc/ipc_fuzzing_tests.cc b/ipc/ipc_fuzzing_tests.cc
index efaed2cdeeaf7aff9a592945a13e81046e1c9d25..9cc92c4582d2bb7d11c23c079d82d1662262f777 100644
--- a/ipc/ipc_fuzzing_tests.cc
+++ b/ipc/ipc_fuzzing_tests.cc
@@ -5,6 +5,7 @@
#include <stdint.h>
#include <stdio.h>
+#include <limits>
#include <sstream>
#include <string>
@@ -40,7 +41,7 @@ namespace {
TEST(IPCMessageIntegrity, ReadBeyondBufferStr) {
// This was BUG 984408.
- uint32_t v1 = kuint32max - 1;
+ uint32_t v1 = std::numeric_limits<uint32_t>::max() - 1;
int v2 = 666;
IPC::Message m(0, 1, IPC::Message::PRIORITY_NORMAL);
EXPECT_TRUE(m.WriteInt(v1));
@@ -53,7 +54,7 @@ TEST(IPCMessageIntegrity, ReadBeyondBufferStr) {
TEST(IPCMessageIntegrity, ReadBeyondBufferStr16) {
// This was BUG 984408.
- uint32_t v1 = kuint32max - 1;
+ uint32_t v1 = std::numeric_limits<uint32_t>::max() - 1;
int v2 = 777;
IPC::Message m(0, 1, IPC::Message::PRIORITY_NORMAL);
EXPECT_TRUE(m.WriteInt(v1));
« no previous file with comments | « ipc/ipc_channel.h ('k') | ipc/ipc_message.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698