| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent bfb1dc0 commit 77f9c1f
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -831,8 +831,9 @@ void CBORTokenizer::ReadNextToken(bool enter_envelope) { | |||
| 831 | 831 | // inspector_protocol, it's not a CBOR limitation), so we check | |
| 832 | 832 | // against the signed max, so that the allowable values are | |
| 833 | 833 | // 0, 1, 2, ... 2^31 - 1. | |
| 834 | - if (!bytes_read || std::numeric_limits<int32_t>::max() < | ||
| 835 | - token_start_internal_value_) { | ||
| 834 | + if (!bytes_read || | ||
| 835 | + static_cast<int64_t>(std::numeric_limits<int32_t>::max()) < | ||
| 836 | + static_cast<int64_t>(token_start_internal_value_)) { | ||
| 836 | 837 | SetError(Error::CBOR_INVALID_INT32); | |
| 837 | 838 | return; | |
| 838 | 839 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -839,8 +839,9 @@ void CBORTokenizer::ReadNextToken(bool enter_envelope) { | |||
| 839 | 839 | // inspector_protocol, it's not a CBOR limitation), so we check | |
| 840 | 840 | // against the signed max, so that the allowable values are | |
| 841 | 841 | // 0, 1, 2, ... 2^31 - 1. | |
| 842 | - if (!bytes_read || std::numeric_limits<int32_t>::max() < | ||
| 843 | - token_start_internal_value_) { | ||
| 842 | + if (!bytes_read || | ||
| 843 | + static_cast<int64_t>(std::numeric_limits<int32_t>::max()) < | ||
| 844 | + static_cast<int64_t>(token_start_internal_value_)) { | ||
| 844 | 845 | SetError(Error::CBOR_INVALID_INT32); | |
| 845 | 846 | return; | |
| 846 | 847 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments