From 70ea760717f98cabce1adf9313cc2938dd82b8f1 Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Thu, 10 Dec 2020 23:49:51 -0800 Subject: [PATCH] fix bounds check --- firmware/bootloader/bootloader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/bootloader/bootloader.cpp b/firmware/bootloader/bootloader.cpp index 36bbbfb..fa90dee 100644 --- a/firmware/bootloader/bootloader.cpp +++ b/firmware/bootloader/bootloader.cpp @@ -157,7 +157,7 @@ void RunBootloaderLoop() sendNak(); } // Don't allow out of bounds writes - else if (embeddedData < 0 || embeddedData > 26 * 1024) + else if (embeddedData >= 26 * 1024) { sendNak(); }