diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2016-12-13 15:19:34 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-13 15:19:34 -0800 |
commit | f983302ca7051bd1364a6ea9218e21040e4a851b (patch) | |
tree | 5b0302cd89bb8ff5e120a28ea2ec082c6b754b78 /src/google | |
parent | 837fd6b6a09d35440959222d2797bc7dd626c1e4 (diff) | |
parent | 4c5d3eddf99fea6ba652a487d6e7690b51e8aa23 (diff) | |
download | protobuf-f983302ca7051bd1364a6ea9218e21040e4a851b.tar.gz protobuf-f983302ca7051bd1364a6ea9218e21040e4a851b.tar.bz2 protobuf-f983302ca7051bd1364a6ea9218e21040e4a851b.zip |
Merge pull request #2496 from xyzzyz/fix-overflow
Fix integer overflow in FastUInt32ToBufferLeft
Diffstat (limited to 'src/google')
-rw-r--r-- | src/google/protobuf/stubs/strutil.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/google/protobuf/stubs/strutil.cc b/src/google/protobuf/stubs/strutil.cc index 4fa8e99f..15b6e53f 100644 --- a/src/google/protobuf/stubs/strutil.cc +++ b/src/google/protobuf/stubs/strutil.cc @@ -981,7 +981,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 (%), |