mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-22 17:57:32 +00:00
Fix for integer overflow
This commit is contained in:
@@ -450,7 +450,7 @@ bool StoreForwardPlusPlusModule::handleReceivedProtobuf(const meshtastic_MeshPac
|
|||||||
} else {
|
} else {
|
||||||
LOG_DEBUG("StoreForwardpp End of chain does not match! Checking distance behind.");
|
LOG_DEBUG("StoreForwardpp End of chain does not match! Checking distance behind.");
|
||||||
int64_t links_behind = 0;
|
int64_t links_behind = 0;
|
||||||
if (t->chain_count != 0) {
|
if (t->chain_count != 0 && t->chain_count > chain_end.counter) {
|
||||||
links_behind = t->chain_count - chain_end.counter;
|
links_behind = t->chain_count - chain_end.counter;
|
||||||
|
|
||||||
LOG_DEBUG("StoreForwardpp Links behind: %ld", links_behind);
|
LOG_DEBUG("StoreForwardpp Links behind: %ld", links_behind);
|
||||||
|
|||||||
Reference in New Issue
Block a user