From e72cebbad65c054ac3bb03a12d6c1102a78c834f Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 16 Aug 2018 00:29:18 -0700 Subject: [PATCH] Fix crash due to unsigned index and 0 boundary loop. --- supervisor/shared/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supervisor/shared/memory.c b/supervisor/shared/memory.c index 34c5dfb6f8..6c8be3be8a 100755 --- a/supervisor/shared/memory.c +++ b/supervisor/shared/memory.c @@ -43,7 +43,7 @@ void memory_init(void) { } void free_memory(supervisor_allocation* allocation) { - uint8_t index = 0; + int32_t index = 0; bool found = false; for (index = 0; index < CIRCUITPY_SUPERVISOR_ALLOC_COUNT; index++) { found = allocation == &allocations[index];