You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
FreeRTOS-Kernel/portable/MemMang
Gaurav Aggarwal 618e165fa7 Fix NULL pointer dereference in vPortGetHeapStats
When the heap is exhausted (no free block), start and end markers are
the only blocks present in the free block list:

     +---------------+     +-----------> NULL
     |               |     |
     |               V     |
+ ----- +            + ----- +
|   |   |            |   |   |
|   |   |            |   |   |
+ ----- +            + ----- +
  xStart               pxEnd

The code block which traverses the list of free blocks to calculate heap
stats used a do..while loop that moved past the end marker when the heap
had no free block resulting in a NULL pointer dereference. This commit
changes the do..while loop to while loop thereby ensuring that we never
move past the end marker.

This was reported here - https://github.com/FreeRTOS/FreeRTOS-Kernel/issues/534

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
3 years ago
..
ReadMe.url Style: Make freertos.org = FreeRTOS.org and add https (#134) 5 years ago
heap_1.c Declare vApplicationMallocFailedHook function in task.h instead in each C heap file (#483) 3 years ago
heap_2.c Declare vApplicationMallocFailedHook function in task.h instead in each C heap file (#483) 3 years ago
heap_3.c Aligned nullptr check for heap3. (#493) 3 years ago
heap_4.c Fix NULL pointer dereference in vPortGetHeapStats 3 years ago
heap_5.c Fix NULL pointer dereference in vPortGetHeapStats 3 years ago

ReadMe.url

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
[InternetShortcut]
URL=https://www.FreeRTOS.org/a00111.html
IDList=