File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -850,8 +850,9 @@ void CBORTokenizer::ReadNextToken(bool enter_envelope) {
850850 // We check the the payload in token_start_internal_value_ against
851851 // that range (2^31-1 is also known as
852852 // std::numeric_limits<int32_t>::max()).
853- if (!bytes_read || token_start_internal_value_ >
854- std::numeric_limits<int32_t >::max ()) {
853+ if (!bytes_read ||
854+ static_cast <int64_t >(token_start_internal_value_) >
855+ static_cast <int64_t >(std::numeric_limits<int32_t >::max ())) {
855856 SetError (Error::CBOR_INVALID_INT32);
856857 return ;
857858 }
Original file line number Diff line number Diff line change @@ -858,8 +858,9 @@ void CBORTokenizer::ReadNextToken(bool enter_envelope) {
858858 // We check the the payload in token_start_internal_value_ against
859859 // that range (2^31-1 is also known as
860860 // std::numeric_limits<int32_t>::max()).
861- if (!bytes_read || token_start_internal_value_ >
862- std::numeric_limits<int32_t>::max()) {
861+ if (!bytes_read ||
862+ static_cast<int64_t>(token_start_internal_value_) >
863+ static_cast<int64_t>(std::numeric_limits<int32_t>::max())) {
863864 SetError(Error::CBOR_INVALID_INT32);
864865 return;
865866 }
You can’t perform that action at this time.
0 commit comments