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