ARM9 architecture. C. programming language
We have a third-party stack, and one of the calls takes a pointer ( pBuffer) to a memory location. Inside the stack, they can freely move along the passed pointer and access it at their discretion. Unfortunately, they shift the one passed in in the pointer and pass it to another function that tried to do this from the memory cell odd / unaudited
((uint16 *)pBuffer)[index] = value;
where it valuehas a type uint16and is indexchecked by borders and indices pBuffer. This leads to the exclusion of unoccupied access to memory. pBufferpoints to char *on the heap.
As already mentioned, although we can peer into a third-party stack, we cannot officially update the code. Therefore, we notify the supplier, and they provide an update in the next version.
I want to understand if there is work for this. How to complete the above task without breaking uneven access? What is the best approach to solving such problems.
source
share