mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-12-22 19:39:22 +00:00
Fixed overflow check
This commit is contained in:
parent
f270b979c8
commit
e07d37ede8
1 changed files with 1 additions and 1 deletions
|
@ -168,7 +168,7 @@ const uint8_t* readVarint(const uint8_t* data, const uint8_t* data_end, T& b)
|
|||
const uint64_t cur_byte = *(data++);
|
||||
result |= (cur_byte & 0x7F) << k;
|
||||
|
||||
if (shiftleft128(cur_byte & 0x7F, 0, k) != 0) {
|
||||
if ((k > 0) && (shiftleft128(cur_byte & 0x7F, 0, k) != 0)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue