summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c9c41fd)
raw | patch | inline | side by side (parent: c9c41fd)
author | Don Dominic <dondmadappallil@ti.com> | |
Wed, 15 Feb 2023 13:20:12 +0000 (18:50 +0530) | ||
committer | Rishabh Garg <rishabh@ti.com> | |
Wed, 15 Feb 2023 13:59:41 +0000 (07:59 -0600) |
Add note in HeapP_alloc API documentation to mention about possible
potential issues with buffer overflow and relevant info on HeapP
implementation
Signed-off-by: Don Dominic <dondmadappallil@ti.com>
potential issues with buffer overflow and relevant info on HeapP
implementation
Signed-off-by: Don Dominic <dondmadappallil@ti.com>
packages/ti/osal/HeapP.h | patch | blob | history |
index 541dff8a048a730294b6aedbf5bac93c3ea7de1f..4c401d486cab17fb0b2cb4ac4ac694fe10dd4fc5 100755 (executable)
--- a/packages/ti/osal/HeapP.h
+++ b/packages/ti/osal/HeapP.h
* @param handle [in] Heap handle
* @param allocSize [in] Size of memory to allocate
*
+ * NOTE: Application should make sure that there is no buffer overflow.
+ * i.e., writing to memory beyond allocated size for this heap chunk would
+ * potentially cause unexpected failures.
+ * Specifically the heap implementation stores relevant software book-keeping
+ * parameters in the unallocated/free heap regions. Overflow of a previous
+ * allocated buffer could corrupt this and could cause issues with successive
+ * heap allocations. Similarly this could also corrupt the contents of
+ * successive allocated buffers as well.
+ *
* \return pointer to allcoated memory
* \return NULL - memory could not be allocated since a free block of required size could not be found
*/