I understand you probably dident create all this for EZ or even another forum. But this IS a forum. We would very much appreciate it if we dident have to download a zip and then opening multiple PDF's and code files in various viewers and editors. Make your stuff forum friendly in the future please.
OK, i'll try to be more informative & short as well.
So, the approach is based upon simple idea: access to array must be provided by three parameters:
1. base address of array, i.e. &array[0].
2. offset in array to access to o/& since.
3. size of array.
====================
if we know for sure all-that, we can certainly calculate how many bytes to write in w/o the least risk to overflow. In other words, safe memory shouldn't be accessed Just by arbitrary address.