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

Unified Diff: third_party/protobuf/src/google/protobuf/stubs/strutil.cc

Issue 2570123002: Fix integer overflow in FastUInt32ToBufferLeft (Closed)
Patch Set: CQ refresh Created 3 years, 10 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 | « third_party/protobuf/patches/0012-fix-overflow-FastUInt32ToBufferLeft.patch ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/protobuf/src/google/protobuf/stubs/strutil.cc
diff --git a/third_party/protobuf/src/google/protobuf/stubs/strutil.cc b/third_party/protobuf/src/google/protobuf/stubs/strutil.cc
index 7ba92e8f1fa4d95dd77feb4a14abe6aa1326c1b7..85aa324eabfb4e53f6a4c97d458cf09370a96a13 100644
--- a/third_party/protobuf/src/google/protobuf/stubs/strutil.cc
+++ b/third_party/protobuf/src/google/protobuf/stubs/strutil.cc
@@ -966,7 +966,7 @@ static const char two_ASCII_digits[100][2] = {
};
char* FastUInt32ToBufferLeft(uint32 u, char* buffer) {
- int digits;
+ uint32 digits;
const char *ASCII_digits = NULL;
// The idea of this implementation is to trim the number of divides to as few
// as possible by using multiplication and subtraction rather than mod (%),
« no previous file with comments | « third_party/protobuf/patches/0012-fix-overflow-FastUInt32ToBufferLeft.patch ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698