Index: base/sys_info_linux.cc |
diff --git a/base/sys_info_linux.cc b/base/sys_info_linux.cc |
index eb89e5eb6d4cd4f75c19cb5da87300af7cd0904a..2e679ed39f3a52b7edc2b69d8ec5059575f9ed32 100644 |
--- a/base/sys_info_linux.cc |
+++ b/base/sys_info_linux.cc |
@@ -36,12 +36,11 @@ size_t MaxSharedMemorySize() { |
contents.erase(contents.length() - 1); |
} |
- int64 limit; |
- if (!base::StringToInt64(contents, &limit)) { |
+ uint64 limit; |
+ if (!base::StringToUint64(contents, &limit)) { |
limit = 0; |
} |
- if (limit < 0 || |
- static_cast<uint64>(limit) > std::numeric_limits<size_t>::max()) { |
+ if (limit > std::numeric_limits<size_t>::max()) { |
limit = 0; |
} |
DCHECK(limit > 0); |