From 7d6a0f20c655857cbb4d954d59cc2ede72982388 Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Thu, 1 Jan 2026 22:16:23 -0600 Subject: [PATCH] Add extra check for end of chain matching --- src/modules/Native/StoreForwardPlusPlus.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/Native/StoreForwardPlusPlus.cpp b/src/modules/Native/StoreForwardPlusPlus.cpp index f9d908629..79693abcc 100644 --- a/src/modules/Native/StoreForwardPlusPlus.cpp +++ b/src/modules/Native/StoreForwardPlusPlus.cpp @@ -423,7 +423,8 @@ bool StoreForwardPlusPlusModule::handleReceivedProtobuf(const meshtastic_MeshPac // get chain tip if (chain_end.rx_time != 0) { - if (memcmp(chain_end.commit_hash, t->commit_hash.bytes, t->commit_hash.size) == 0) { + if (t->commit_hash.size >= SFPP_SHORT_HASH_SIZE && + memcmp(chain_end.commit_hash, t->commit_hash.bytes, t->commit_hash.size) == 0) { LOG_DEBUG("StoreForwardpp End of chain matches!"); sendFromScratch(chain_end.root_hash); } else {