mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
tools: fix more build warnings in inspector_protocol
PR-URL: https://github.com/nodejs/node/pull/39725 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
committed by
James M Snell
parent
a48b9c330a
commit
8c954103ab
@@ -850,8 +850,9 @@ void CBORTokenizer::ReadNextToken(bool enter_envelope) {
|
||||
// We check the the payload in token_start_internal_value_ against
|
||||
// that range (2^31-1 is also known as
|
||||
// std::numeric_limits<int32_t>::max()).
|
||||
if (!bytes_read || token_start_internal_value_ >
|
||||
std::numeric_limits<int32_t>::max()) {
|
||||
if (!bytes_read ||
|
||||
static_cast<int64_t>(token_start_internal_value_) >
|
||||
static_cast<int64_t>(std::numeric_limits<int32_t>::max())) {
|
||||
SetError(Error::CBOR_INVALID_INT32);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -858,8 +858,9 @@ void CBORTokenizer::ReadNextToken(bool enter_envelope) {
|
||||
// We check the the payload in token_start_internal_value_ against
|
||||
// that range (2^31-1 is also known as
|
||||
// std::numeric_limits<int32_t>::max()).
|
||||
if (!bytes_read || token_start_internal_value_ >
|
||||
std::numeric_limits<int32_t>::max()) {
|
||||
if (!bytes_read ||
|
||||
static_cast<int64_t>(token_start_internal_value_) >
|
||||
static_cast<int64_t>(std::numeric_limits<int32_t>::max())) {
|
||||
SetError(Error::CBOR_INVALID_INT32);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user